Add date and timestamp search option

This commit is contained in:
ncois
2023-11-30 19:04:14 +01:00
parent 1c92394563
commit 2584a1f2b0
3 changed files with 34 additions and 1 deletions

View File

@@ -227,6 +227,10 @@ export class ApiService {
return this.httpClient.get<BlockExtended>(this.apiBaseUrl + this.apiBasePath + '/api/v1/block/' + hash);
}
getBlockDataFromTimestamp$(timestamp: number): Observable<any> {
return this.httpClient.get<number>(this.apiBaseUrl + this.apiBasePath + '/api/v1/mining/blocks/timestamp/' + timestamp);
}
getStrippedBlockTransactions$(hash: string): Observable<TransactionStripped[]> {
return this.httpClient.get<TransactionStripped[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/block/' + hash + '/summary');
}