Browse Source

explorer overhaul

jahway603
D 3 months ago
parent
commit
7b0eeed095
  1. 4
      .gitignore
  2. 109
      explorer.dragonx.is/bin/update_blocks_redis.pl
  3. 347
      explorer.dragonx.is/block/template.html
  4. 140
      explorer.dragonx.is/blocks/template.html
  5. 3
      explorer.dragonx.is/export_env.sh
  6. 314
      explorer.dragonx.is/index.html
  7. 297
      explorer.dragonx.is/template.html
  8. 11
      explorer.dragonx.is/update_api.sh
  9. 79
      explorer.dragonx.is/update_hashrate.sh
  10. 90
      main.js

4
.gitignore

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

109
explorer.dragonx.is/bin/update_blocks_redis.pl

@ -282,7 +282,7 @@ STUFF
STUFF
} else {
$txBG = "rgba(0, 255, 8, 0.1)";
$txOutline = "rgba(0, 255, 8, 0.5)";
$txOutline = "rgba(0, 255, 8, 0.6)";
$stuff =<<STUFF;
$from => zs1??? (fully shielded)
@ -291,42 +291,53 @@ STUFF
}
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 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>
</div>
</div>
</div>
HTML
$STATS->{TX_TABLE} .= $tx_table;
@ -397,14 +408,24 @@ for my $b (reverse @blocks) {
$duration = "--" unless $duration;
$STATS->{BLOCKS_TABLE} .= <<"FUCK";
<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>
<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
}

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

@ -1,195 +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>
<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>
<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="">Block List</a>
<a class="explorer-btn" href="">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=""
>#BLOCKHASH#</a
>
</div>
<div class="block-info">
<p>Prev Hash</p>
<a href=""
>#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>
<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="./tg" class="component-button" style="--index: 2"><small
class="">Telegram</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="./tg" class="component-button"><small class="">Telegram</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-block-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-blocks-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="block-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> -->
<!-- #BLOCKS_TABLE# -->
<div class="block-info-bar">
<div class="block-info-height">
<h3>Block</h3>
<a href="/block/#BLOCKS#/" class="">#BLOCKS#</a>
</div>
<div class="block-info-main">
<h3>Difficulty</h3>
<span class="">#DIFFICULTY#</span>
</div>
<div class="block-info-main">
<h3>Block Size</h3>
<span class="">#BLOCKSIZE#</span>
</div>
<div class="block-info-main">
<h3>Block Time</h3>
<span class="">#BLOCKTIME#</span>
</div>
<div class="block-info-main">
<h3>Block Version</h3>
<span class="">#VERSION#</span>
</div>
<div class="block-info-main">
<h3>Block Bits</h3>
<span class="">#BITS#</span>
</div>
<div class="block-info-main">
<h3>Reward</h3>
<span class="">#BLOCKREWARD#</span>
</div>
<div class="block-info-hash">
<h3>Block Hash</h3>
<span class=""> <a href="/block/#BLOCKHASH#">#BLOCKHASH#</a></span>
</div>
<div class="block-info-hash">
<h3>Prev Hash</h3>
<span class="">
<a href="/block/#PREVIOUSBLOCKHASH#">#PREVIOUSBLOCKHASH#</a></span>
</div>
<div class="block-adv-info" style="--adv-info-index: 31.5; --adv-info-index-m: 49.5">
<h3>Block Nonce</h3>
<span class="">#BLOCKNONCE#</span>
</div>
<div class="block-adv-info" style="--adv-info-index: 35.5; --adv-info-index-m: 55">
<h3>Block Anchor</h3>
<span class="">#ANCHOR#</span>
</div>
<div class="block-adv-info" style="--adv-info-index: 39.5; --adv-info-index-m: 60.5">
<h3>Chainwork</h3>
<span class="">#CHAINWORK#</span>
</div>
<div class="block-adv-info" style="--adv-info-index: 43.5; --adv-info-index-m: 66">
<h3>Merkle Root</h3>
<span class="">#MERKLEROOT#</span>
</div>
<div class="block-adv-info" style="--adv-info-index: 47.5; --adv-info-index-m: 71.5">
<h3>Final Sapling Root</h3>
<span class="">#FINALSAPLINGROOT#</span>
</div>
<div class="block-info-spacing"></div>
#TX_TABLE#
<!-- <div class="transaction">
<div class="shielded" style="--shielded-text: shielded; --shielded-col: rgba(255, 204, 0, 0.6);">
<span>Unshielded</span>
</div>
<div class="tx-container-top" style="--tx-outline: rgba(255, 204, 0, 0.6); --tx-border-bot: none;">
<h3>Transaction</h3>
<div class="tx-reward">${coinbase} DRGX</div>
<span>$locktime</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: rgba(255, 204, 0, 0.6); --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> -->
</div>
</section>
</div>
<div class="explorer-tab-bar">
<!-- <label for="hush-tab" class="explorer-tab" style="--tab-index: 2;">
<span>HUSH</span>
</label> -->
<div class="explorer-tab-back" style="--tab-index: 0">
<a href="https://explorer.dragonx.is"
style="text-decoration: none; color: inherit">Explorer</a>
</div>
<div class="explorer-tab-back" style="--tab-index: 0">
<a href="https://explorer.dragonx.is/blocks"
style="text-decoration: none; color: inherit">Blocks</a>
</div>
<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>
</body>

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

@ -1,106 +1,48 @@
<!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">
<link rel="stylesheet" href="../../dragonx.is/style.css">
<link rel="icon" type="image/x-icon" href="../logo_dragonx.png">
<title>Explorer | DragonX</title>
</head>
<!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>
<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="./tg" class="component-button" style="--index: 2"><small
class="">Telegram</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="./tg" class="component-button"><small class="">Telegram</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>
<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> -->
<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-blocks-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="blocks-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> -->
#BLOCKS_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> -->
</section>
</div>
<div class="explorer-tab-bar">
<!-- <label for="hush-tab" class="explorer-tab" style="--tab-index: 2;">
<span>HUSH</span>
</label> -->
<div class="explorer-tab-back" style="--tab-index: 0;">
<a href="https://explorer.dragonx.is"
style="text-decoration: none; color: inherit;">Back</a>
</div>
<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>
</body>

3
explorer.dragonx.is/export_env.sh

@ -2,4 +2,5 @@
export SIONA_ROOT_DIR="siona-DragonX"
export SIONA_DOMAIN="explorer.dragonx.is"
export SIONA_CLI="/home/admin/HUSH/hush3/src/dragonx-cli"
export SIONA_CLI="/home/admin/HUSH/hush3/src/dragonx-cli"
export SIONA_ACNAME="DRAGONX"

314
explorer.dragonx.is/index.html

@ -1,156 +1,168 @@
<!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="./logo_dragonx.png" />
<title>Explorer | DragonX</title>
</head>
<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>
<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/mining">How To Mine</a>
<a class="btn" href="https://dragonx.is/tg">Telegram</a>
<a class="btn" href="https://dragonx.is/matrix">Matrix</a>
<a class="btn" href="https://git.hush.is/dragonx/dragonx"
>Documentation</a
>
</div>
</header>
<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>
<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="./tg" class="component-button" style="--index: 2"><small class="">Telegram</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="./tg" class="component-button"><small class="">Telegram</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="https://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">0.00000273 BTC</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">.0077033708 BTC</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>
<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>
</html>
</div>
<div class="explorer-4 flex-center">
<a href="" class="btn">Blocklist</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="../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">
<a href="" class="footer-social"
><img
src="../../img/graphics/icon_link_out.svg"
onmouseover="src='../../img/graphics/icon_linkout_red.svg'"
onmouseleave="src='../../img/graphics/icon_link_out.svg'"
alt=""
/></a>
<a href="" class="footer-social"
><img
src="../../img/graphics/icon_link_out.svg"
onmouseover="src='../../img/graphics/icon_linkout_red.svg'"
onmouseleave="src='../../img/graphics/icon_link_out.svg'"
alt=""
/></a>
<a href="" class="footer-social"
><img
src="../../img/graphics/icon_link_out.svg"
onmouseover="src='../../img/graphics/icon_linkout_red.svg'"
onmouseleave="src='../../img/graphics/icon_link_out.svg'"
alt=""
/></a>
</div>
© Copyright DragonX
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
</footer>
</body>
</html>

297
explorer.dragonx.is/template.html

@ -1,145 +1,168 @@
<!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>
<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="/siona-DragonX/logo_dragonx.ico">
<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/mining">How To Mine</a>
<a class="btn" href="https://dragonx.is/tg">Telegram</a>
<a class="btn" href="https://dragonx.is/matrix">Matrix</a>
<a class="btn" href="https://git.hush.is/dragonx/dragonx"
>Documentation</a
>
</div>
</header>
<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>
<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>
<div>
<p>Anonymity Set:</p>
<p>#ANONSET#</p>
</div>
</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>
</nav>
</section>
</div>
<div class="explorer-tab-bar">
<div>
<p>Total Transactions:</p>
<p>#TXCOUNT#</p>
</div>
<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;">
<div>
<p>Transaction Rate:</p>
<p>#TXRATE#</p>
</div>
<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>
<div>
<p>Total Volume:</p>
<p>.0077033708 BTC</p>
</div>
</html>
</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="" class="btn">Blocklist</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="../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">
<a href="" class="footer-social"
><img
src="../../img/graphics/icon_link_out.svg"
onmouseover="src='../../img/graphics/icon_linkout_red.svg'"
onmouseleave="src='../../img/graphics/icon_link_out.svg'"
alt=""
/></a>
<a href="" class="footer-social"
><img
src="../../img/graphics/icon_link_out.svg"
onmouseover="src='../../img/graphics/icon_linkout_red.svg'"
onmouseleave="src='../../img/graphics/icon_link_out.svg'"
alt=""
/></a>
<a href="" class="footer-social"
><img
src="../../img/graphics/icon_link_out.svg"
onmouseover="src='../../img/graphics/icon_linkout_red.svg'"
onmouseleave="src='../../img/graphics/icon_link_out.svg'"
alt=""
/></a>
</div>
© Copyright DragonX
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
</footer>
</body>
</html>

11
explorer.dragonx.is/update_api.sh

@ -1,6 +1,11 @@
#!/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}
@ -10,15 +15,19 @@ 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 getblockchaininfo &> $DIR/getblockchain.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)

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

90
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");
});
Loading…
Cancel
Save