feat: add /block/:hash/raw api route

This commit is contained in:
Leonardo Lima
2022-07-25 14:54:00 -03:00
parent 6ae05c2023
commit 46e63ca6cf
4 changed files with 19 additions and 2 deletions

View File

@@ -50,6 +50,11 @@ class ElectrsApi implements AbstractBitcoinApi {
.then((response) => response.data);
}
$getRawBlock(hash: string): Promise<string> {
return axios.get<string>(config.ESPLORA.REST_API_URL + '/block/' + hash + "/raw", this.axiosConfig)
.then((response) => response.data);
}
$getAddress(address: string): Promise<IEsploraApi.Address> {
throw new Error('Method getAddress not implemented.');
}