Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/TheTrunk/btc-rpc-explorer

  • Loading branch information...
TheTrunk committed Jun 27, 2019
2 parents c849f08 + 678b172 commit 84c6d7b8d45a9b1e4cd2241ac56826d329f9d1bb
Showing with 130 additions and 2 deletions.
  1. +4 −2 app/coins.js
  2. +107 −0 app/coins/dgb.js
  3. +19 −0 public/img/logo/dgb.svg
@@ -3,13 +3,15 @@ var ltc = require("./coins/ltc.js");
var bzx = require("./coins/bzx.js");
var grs = require("./coins/grs.js");
var doge = require("./coins/doge.js");
var dgb = require("./coins/dgb.js");

module.exports = {
"BTC": btc,
"LTC": ltc,
"BZX": bzx,
"GRS": grs,
"DOGE": doge
"DOGE": doge,
"DGB": dgb
,
"coins":["BTC", "LTC", "BZX", "GRS", "DOGE"]
"coins":["BTC", "LTC", "BZX", "GRS", "DOGE", "DGB"]
};
@@ -0,0 +1,107 @@
var Decimal = require("decimal.js");
Decimal8 = Decimal.clone({ precision:8, rounding:8 });

var currencyUnits = [
{
type:"DGB",
name:"DGB",
multiplier:1,
default:true,
values:["", "dgb", "DGB"],
decimalPlaces:8
},
{
type:"native",
name:"mDGB",
multiplier:1000,
values:["mdgb"],
decimalPlaces:5
},
{
type:"native",
name:"bits",
multiplier:1000000,
values:["bits"],
decimalPlaces:2
},
{
type:"native",
name:"sat",
multiplier:100000000,
values:["sat", "satoshi"],
decimalPlaces:0
},
{
type:"exchanged",
name:"USD",
multiplier:"usd",
values:["usd"],
decimalPlaces:2,
symbol:"$"
},
];

module.exports = {
name:"Digibyte",
ticker:"DGB",
logoUrl:"/img/logo/dgb.png",
siteTitle:"Digibyte Explorer",
nodeTitle:"Digibyte Full Node",
nodeUrl:"https://digibyte.io/",
demoSiteUrl: "https://explorer.dgb.zelcore.io",
miningPoolsConfigUrls:[
"https://raw.githubusercontent.com/hashstream/pools/master/pools.json",
],
maxBlockWeight: 40000000,
targetBlockTimeSeconds: 15,
currencyUnits:currencyUnits,
currencyUnitsByName:{"DGB":currencyUnits[0], "mDGB":currencyUnits[1], "bits":currencyUnits[2], "sat":currencyUnits[3]},
baseCurrencyUnit:currencyUnits[3],
defaultCurrencyUnit:currencyUnits[0],
feeSatoshiPerByteBucketMaxima: [5, 10, 25, 50, 100, 150, 200, 250],
genesisBlockHash: "7497ea1b465eb39f1c8f507bc877078fe016d6fcb6dfad3a64c98dcc6e1e8496",
genesisCoinbaseTransactionId: "72ddd9496b004221ed0557358846d9248ecd4c440ebd28ed901efc18757d0fad",
genesisCoinbaseTransaction: {
"txid":"72ddd9496b004221ed0557358846d9248ecd4c440ebd28ed901efc18757d0fad",
"hash":"72ddd9496b004221ed0557358846d9248ecd4c440ebd28ed901efc18757d0fad",
"blockhash":"7497ea1b465eb39f1c8f507bc877078fe016d6fcb6dfad3a64c98dcc6e1e8496",
"version":1,
"locktime":0,
"size":0,
"vsize":0,
"time":0,
"blocktime":0,
"vin":[
{
}
],
"vout":[
{
}
]
},
historicalData: [
],
exchangeRateData:{
jsonUrl:"https://api.coinmarketcap.com/v1/ticker/digibyte/",
exchangedCurrencyName:"usd",
responseBodySelectorFunction:function(responseBody) {
if (responseBody[0] && responseBody[0].price_usd) {
return {"usd":responseBody[0].price_usd};
}

return null;
}
},
blockRewardFunction:function(blockHeight) {
var eras = [ new Decimal8(8000) ];
for (var i = 1; i < 34; i++) {
var previous = eras[i - 1];
eras.push(new Decimal8(previous).dividedBy(2));
}

var index = Math.floor(blockHeight / 100000);

return eras[index];
}
};
@@ -0,0 +1,19 @@
<svg id="DGB" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<defs>
<style>
.cls-1 {
fill: #002352;
}
.cls-1, .cls-2 {
fill-rule: evenodd;
}
.cls-2 {
fill: #fff;
}
</style>
</defs>
<path id="Full" class="cls-1" d="M11,256c0,135.094,109.906,245,245,245S501,391.094,501,256,391.094,11,256,11,11,120.906,11,256Z"/>
<path id="DigiByte" class="cls-2" d="M325.886,136.469l8.379-21.847A3.4,3.4,0,0,0,331.123,110h-31.21l-9.845,25.839H276.243l7.96-21.217A3.4,3.4,0,0,0,281.061,110h-31.21l-9.845,25.839h-97.82a13.025,13.025,0,0,0-10.892,6.3L107,185.206H289.439a45.979,45.979,0,0,1,17.595,3.361c10.892,4.411,23.67,14.5,20.318,37.183-5.236,38.023-43.987,105.246-127.773,106.3l43.359-113.019a7.024,7.024,0,0,0-6.7-9.453H178.214l-70.17,172.679a336.99,336.99,0,0,0,36.237,1.681L137.159,402h32.258a5.846,5.846,0,0,0,5.655-3.991l6.075-15.546c4.817-.42,9.426-1.05,14.453-1.47L187.64,402h32.048a5.845,5.845,0,0,0,5.655-3.991l9.217-23.738C287.135,362.3,343.272,336.037,377,281c67.657-110.918-2.513-139.488-51.109-144.53h0Z"/>
</svg>

0 comments on commit 84c6d7b

Please sign in to comment.
You can’t perform that action at this time.