Adding new getTransactionHex api

This commit is contained in:
softsimon
2022-11-22 21:45:05 +09:00
parent 4f3296566a
commit 584f443f56
4 changed files with 16 additions and 5 deletions

View File

@@ -57,6 +57,11 @@ class BitcoinApi implements AbstractBitcoinApi {
});
}
$getTransactionHex(txId: string): Promise<string> {
return this.$getRawTransaction(txId, true)
.then((tx) => tx.hex || '');
}
$getBlockHeightTip(): Promise<number> {
return this.bitcoindClient.getChainTips()
.then((result: IBitcoinApi.ChainTips[]) => {