* Added difficulty adjustment information API * Added Difficulty API in API docs frontend * Added link to API * Updated the API implementation of difficulty-adjustment * Updated API End Point in frontend * Updated sample API response in frontend
This commit is contained in:
@@ -823,6 +823,23 @@
|
||||
</ng-template>
|
||||
</li>
|
||||
|
||||
<li *ngIf="network.val !== 'bisq'" [ngbNavItem]="8">
|
||||
<a ngbNavLink i18n="api-docs.tab.difficulty|API Docs tab for Difficulty">Difficulty</a>
|
||||
<ng-template ngbNavContent >
|
||||
<div class="difficulty">
|
||||
<div class="endpoint">
|
||||
<div class="subtitle" i18n="Api docs endpoint">Endpoint</div>
|
||||
<a href="{{ network.val === '' ? '' : '/' + network.val }}/api/difficulty-adjustment" target="_blank">GET {{ network.val === '' ? '' : '/' + network.val }}/api/difficulty-adjustment</a>
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="subtitle" i18n>Description</div>
|
||||
<div i18n>Returns details about difficulty adjustment.</div>
|
||||
</div>
|
||||
<app-code-template [code]="code.difficulty" [network]="network.val" ></app-code-template>
|
||||
</div>
|
||||
</ng-template>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div [ngbNavOutlet]="nav" class="mt-2"></div>
|
||||
|
||||
@@ -69,4 +69,8 @@ li.nav-item {
|
||||
}
|
||||
.websocket {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.difficulty {
|
||||
padding: 15px;
|
||||
}
|
||||
@@ -1125,7 +1125,24 @@ responseSample: `{
|
||||
curl: ``,
|
||||
},
|
||||
responseSample: ``,
|
||||
}
|
||||
},
|
||||
|
||||
difficulty: {
|
||||
codeSample: {
|
||||
esModule:``,
|
||||
commonJS:``,
|
||||
curl: `curl -X GET "https://mempool.space/api/difficulty-adjustment"`,
|
||||
},
|
||||
responseSample: `{
|
||||
progressPercent: 18.55392610846515,
|
||||
difficultyChange: -1.2440503501069622,
|
||||
estimatedRetargetDate: 1627400849.2000492,
|
||||
remainingBlocks: 1642,
|
||||
remainingTime: 997456.3840492539
|
||||
|
||||
}`,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -71,6 +71,10 @@ li.nav-item {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.difficulty {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.links {
|
||||
margin-bottom: 5px;
|
||||
a {
|
||||
|
||||
Reference in New Issue
Block a user