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 class="doc-content no-sidebar"> | ||||
|         <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="center note">This part of the API is available to <a href='/enterprise'>sponsors</a> only—whitelisting is required.</p> | ||||
|           </ng-container> | ||||
|           <ng-template #signet_electrs_note> | ||||
|             <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> | ||||
|           </ng-template> | ||||
|           <p class='subtitle'>Hostname</p> | ||||
|           <p>{{plainHostname}}</p> | ||||
|           <p class="subtitle">Port</p> | ||||
|           <p>{{electrsPort}}</p> | ||||
|           <p class="subtitle">SSL</p> | ||||
|           <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> | ||||
|  | ||||
| @ -12,6 +12,8 @@ import { FaqTemplateDirective } from '../faq-template/faq-template.component'; | ||||
|   styleUrls: ['./api-docs.component.scss'] | ||||
| }) | ||||
| export class ApiDocsComponent implements OnInit, AfterViewInit { | ||||
|   plainHostname = document.location.hostname; | ||||
|   electrsPort = 0; | ||||
|   hostname = document.location.hostname; | ||||
|   network$: Observable<string>; | ||||
|   active = 0; | ||||
| @ -82,6 +84,20 @@ export class ApiDocsComponent implements OnInit, AfterViewInit { | ||||
| 
 | ||||
|     this.network$.subscribe((network) => { | ||||
|       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.showWebSocketTab = ( ! ( ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) ); | ||||
|     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"; | ||||
|   } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user