feat: parse rpc full block from hex to binary representation

This commit is contained in:
Leonardo Lima committed 2022-07-27 17:12:33 -03:00
1 parent 7f4a25baa0
commit 6d4ee30a0e
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -77,7 +77,8 @@ class BitcoinApi implements AbstractBitcoinApi {
}
$getRawBlock(hash: string): Promise<string> {
return this.bitcoindClient.getBlock(hash, 0);
return this.bitcoindClient.getBlock(hash, 0)
.then((raw: string) => Buffer.from(raw, "hex"));
}
$getBlockHash(height: number): Promise<string> {