Adding missing Block Tip Hash API

This commit is contained in:
softsimon
2022-06-22 13:15:44 +02:00
parent f75da3cc8f
commit e64bfc039a
5 changed files with 24 additions and 0 deletions

View File

@@ -901,6 +901,16 @@ class Routes {
}
}
public async getBlockTipHash(req: Request, res: Response) {
try {
const result = await bitcoinApi.$getBlockHashTip();
res.setHeader('content-type', 'text/plain');
res.send(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public async getTxIdsForBlock(req: Request, res: Response) {
try {
const result = await bitcoinApi.$getTxIdsForBlock(req.params.hash);