commit-for-adding-api-menu-in-ui
This commit is contained in:
parent
a2e5dc4c2f
commit
a56047f85d
22
server.ts
22
server.ts
@ -122,10 +122,24 @@ controllers.forEach(controller => {
|
|||||||
|
|
||||||
app.get("/api", async (req, res) => {
|
app.get("/api", async (req, res) => {
|
||||||
let blockDetails = await latestBlockDetails();
|
let blockDetails = await latestBlockDetails();
|
||||||
let result = { "Name": "Epic Cash", "Symbol": "EPIC", "TotalSupply": 21000000, "CurrentSupply": blockDetails.coin_existence, "CurrentBlockReward": blockDetails.currentReward,
|
let result = { "Name": "Epic Cash",
|
||||||
"Algorithms": "Cuckoo, RandomX, Pogprow",
|
"Symbol": "EPIC",
|
||||||
"Target_Difficulty": { "Cuckoo": blockDetails.targetdifficultycuckaroo + blockDetails.targetdifficultycuckatoo, "RandomX": blockDetails.targetdifficultyrandomx, "Pogprow": blockDetails.targetdifficultyprogpow },
|
"TotalSupply": 21000000,
|
||||||
"Total_Difficulty": { "Cuckoo": blockDetails.TotalCuckoo, "RandomX": blockDetails.TotalDifficultyRandomx, "Pogprow": blockDetails.TotalDifficultyProgpow },
|
"CurrentSupply": blockDetails.coin_existence,
|
||||||
|
"ChainReward": 16,
|
||||||
|
"FoundationContribution" : blockDetails.foundationReward,
|
||||||
|
"CurrentBlockReward": blockDetails.userReward,
|
||||||
|
"Algorithms": "Cuckoo, RandomX, ProgPow",
|
||||||
|
"Target_Difficulty": {
|
||||||
|
"Cuckoo": blockDetails.targetdifficultycuckaroo + blockDetails.targetdifficultycuckatoo,
|
||||||
|
"RandomX": blockDetails.targetdifficultyrandomx,
|
||||||
|
"ProgPow": blockDetails.targetdifficultyprogpow
|
||||||
|
},
|
||||||
|
"Total_Difficulty": {
|
||||||
|
"Cuckoo": blockDetails.TotalCuckoo,
|
||||||
|
"RandomX": blockDetails.TotalDifficultyRandomx,
|
||||||
|
"ProgPow": blockDetails.TotalDifficultyProgpow
|
||||||
|
},
|
||||||
"BlockHeight": blockDetails.block_height,
|
"BlockHeight": blockDetails.block_height,
|
||||||
"Blockchain": "MimbleWimble",
|
"Blockchain": "MimbleWimble",
|
||||||
"Homepage": "https://epic.tech",
|
"Homepage": "https://epic.tech",
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-md-3 col-lg-4 text-right"> -->
|
<!-- <div class="col-md-3 col-lg-4 text-right"> -->
|
||||||
<div class="col-sm-6 text-right ftr_lng">
|
<div class="col-sm-6 text-right ftr_lng">
|
||||||
|
<a href="/api" target="_blank" class="text_underline mr-2" style="font-size: 1rem">API</a>
|
||||||
<div class="dropdown ftr_dropdown pr-2 d-inline-block py-2">
|
<div class="dropdown ftr_dropdown pr-2 d-inline-block py-2">
|
||||||
<span class="flag" [ngStyle]="{ 'background-image': 'url(assets/img/' + translate.getCurrentLang() + '.jpg)'}"></span>
|
<span class="flag" [ngStyle]="{ 'background-image': 'url(assets/img/' + translate.getCurrentLang() + '.jpg)'}"></span>
|
||||||
<!--<span class="flag" ngIf="translate.getCurrentLang() =='de'" style="background-image: url('assets/img/german.jpg')"></span>-->
|
<!--<span class="flag" ngIf="translate.getCurrentLang() =='de'" style="background-image: url('assets/img/german.jpg')"></span>-->
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<header class="headerbg">
|
<header class="headerbg">
|
||||||
<div class="home_tst_net mt-3 d-block d-sm-none position-relative">
|
<div class="home_tst_net mt-3 d-block d-sm-none position-relative">
|
||||||
<a href="https://epic.tech/" target="_blank" class="text_underline mr-2">Epic Cash</a>
|
<a href="https://epic.tech/" target="_blank" class="text_underline mr-2">Epic Cash</a>
|
||||||
|
<a href="/api" target="_blank" class="text_underline mr-2">API</a>
|
||||||
<span>You are viewing </span>
|
<span>You are viewing </span>
|
||||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
||||||
<option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option>
|
<option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option>
|
||||||
@ -47,6 +48,7 @@
|
|||||||
</li> -->
|
</li> -->
|
||||||
<li class="home_tst_net mr-3 d-none d-sm-inline-block position-relative">
|
<li class="home_tst_net mr-3 d-none d-sm-inline-block position-relative">
|
||||||
<a href="https://epic.tech/" target="_blank" class="text_underline mr-2">Epic Cash</a>
|
<a href="https://epic.tech/" target="_blank" class="text_underline mr-2">Epic Cash</a>
|
||||||
|
<a href="/api" target="_blank" class="text_underline mr-2">API</a>
|
||||||
<span>You are viewing </span>
|
<span>You are viewing </span>
|
||||||
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
<select (change)="onChangeNetwork($event.target.value)" class="langbut py-2 pr-3 pl-1">
|
||||||
<option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option>
|
<option value="Floonet" [selected]="'Floonet' == getNetwork()" >FlooNet</option>
|
||||||
|
Loading…
Reference in New Issue
Block a user