Add electrum rpc port numbers and update note
This commit is contained in:
parent
cb576ce601
commit
dbb6f267f4
@ -109,12 +109,13 @@
|
|||||||
<div id="electrs" *ngIf="whichTab === 'electrs'">
|
<div id="electrs" *ngIf="whichTab === 'electrs'">
|
||||||
<div class="doc-content no-sidebar">
|
<div class="doc-content no-sidebar">
|
||||||
<div class="doc-item-container">
|
<div class="doc-item-container">
|
||||||
<ng-container #default_electrs_note *ngIf="network.val === '' || network.val === 'mainnet' || network.val === 'testnet'; else signet_electrs_note">
|
<p class='subtitle'>Hostname</p>
|
||||||
<p class="center note">This part of the API is available to <a href='/enterprise'>sponsors</a> only—whitelisting is required.</p>
|
<p>{{plainHostname}}</p>
|
||||||
</ng-container>
|
<p class="subtitle">Port</p>
|
||||||
<ng-template #signet_electrs_note>
|
<p>{{electrsPort}}</p>
|
||||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
<p class="subtitle">SSL</p>
|
||||||
</ng-template>
|
<p>Enabled</p>
|
||||||
|
<p class="note" *ngIf="network.val !== 'signet'">Electrum RPC interface for Bitcoin Signet is <a href="/signet/docs/api/electrs">publicly available</a>. Electrum RPC interface for all other networks is available to <a href='/enterprise'>sponsors</a> only—whitelisting is required.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,6 +12,8 @@ import { FaqTemplateDirective } from '../faq-template/faq-template.component';
|
|||||||
styleUrls: ['./api-docs.component.scss']
|
styleUrls: ['./api-docs.component.scss']
|
||||||
})
|
})
|
||||||
export class ApiDocsComponent implements OnInit, AfterViewInit {
|
export class ApiDocsComponent implements OnInit, AfterViewInit {
|
||||||
|
plainHostname = document.location.hostname;
|
||||||
|
electrsPort = 0;
|
||||||
hostname = document.location.hostname;
|
hostname = document.location.hostname;
|
||||||
network$: Observable<string>;
|
network$: Observable<string>;
|
||||||
active = 0;
|
active = 0;
|
||||||
@ -82,6 +84,20 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
this.network$.subscribe((network) => {
|
this.network$.subscribe((network) => {
|
||||||
this.active = (network === 'liquid' || network === 'liquidtestnet') ? 2 : 0;
|
this.active = (network === 'liquid' || network === 'liquidtestnet') ? 2 : 0;
|
||||||
|
switch( network ) {
|
||||||
|
case "":
|
||||||
|
this.electrsPort = 50002; break;
|
||||||
|
case "mainnet":
|
||||||
|
this.electrsPort = 50002; break;
|
||||||
|
case "testnet":
|
||||||
|
this.electrsPort = 60002; break;
|
||||||
|
case "signet":
|
||||||
|
this.electrsPort = 60602; break;
|
||||||
|
case "liquid":
|
||||||
|
this.electrsPort = 51002; break;
|
||||||
|
case "liquidtestnet":
|
||||||
|
this.electrsPort = 51302; break;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ export class DocsComponent implements OnInit {
|
|||||||
this.env = this.stateService.env;
|
this.env = this.stateService.env;
|
||||||
this.showWebSocketTab = ( ! ( ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
|
this.showWebSocketTab = ( ! ( ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
|
||||||
this.showFaqTab = ( this.env.BASE_MODULE === 'mempool' ) ? true : false;
|
this.showFaqTab = ( this.env.BASE_MODULE === 'mempool' ) ? true : false;
|
||||||
this.showElectrsTab = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && ( this.stateService.network === "" || this.stateService.network === "mainnet" || this.stateService.network === "testnet" || this.stateService.network === "signet" );
|
this.showElectrsTab = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && ( this.stateService.network !== "bisq" );
|
||||||
|
|
||||||
document.querySelector<HTMLElement>( "html" ).style.scrollBehavior = "smooth";
|
document.querySelector<HTMLElement>( "html" ).style.scrollBehavior = "smooth";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user