Block view.

This commit is contained in:
Simon Lindh
2019-11-12 16:39:59 +08:00
parent bd2bd478ef
commit 309e851ead
24 changed files with 455 additions and 126 deletions

View File

@@ -162,11 +162,19 @@ export class ApiService {
return this.httpClient.get<IMempoolStats[]>(API_BASE_URL + '/statistics/6m');
}
listBlocks$(height?: number): Observable<IBlockTransaction[]> {
return this.httpClient.get<IBlockTransaction[]>(API_BASE_URL + '/explorer/blocks/' + (height || ''));
listBlocks$(height?: number): Observable<any[]> {
return this.httpClient.get<any[]>(API_BASE_URL + '/explorer/blocks/' + (height || ''));
}
getTransaction$(txId: string): Observable<IBlockTransaction[]> {
return this.httpClient.get<IBlockTransaction[]>(API_BASE_URL + '/explorer/tx/' + txId);
getTransaction$(txId: string): Observable<any[]> {
return this.httpClient.get<any[]>(API_BASE_URL + '/explorer/tx/' + txId);
}
getBlock$(hash: string): Observable<any[]> {
return this.httpClient.get<any[]>(API_BASE_URL + '/explorer/block/' + hash);
}
getBlockTransactions$(hash: string, index?: number): Observable<any[]> {
return this.httpClient.get<any[]>(API_BASE_URL + '/explorer/block/' + hash + '/tx/' + (index || ''));
}
}