Allow search and navigate by block height.

fixes #41
This commit is contained in:
softsimon
2020-05-10 14:32:27 +07:00
parent 756caf2c53
commit 9b4e5194c1
3 changed files with 29 additions and 3 deletions

View File

@@ -50,6 +50,10 @@ export class ElectrsApiService {
return this.httpClient.get<Transaction[]>(this.apiBaseUrl + '/block/' + hash + '/txs/' + index);
}
getBlockHashFromHeight$(height: number): Observable<string> {
return this.httpClient.get(this.apiBaseUrl + '/block-height/' + height, {responseType: 'text'});
}
getAddress$(address: string): Observable<Address> {
return this.httpClient.get<Address>(this.apiBaseUrl + '/address/' + address);
}