Transaction view.

This commit is contained in:
Simon Lindh committed 2019-11-10 16:44:00 +08:00
1 parent 02d67e8406
commit bd2bd478ef
26 files changed
+287 -37

No files matched your search

+1
View File
@@ -268,6 +268,7 @@ class MempoolSpace {
this.app
.get(config.API_ENDPOINT + 'explorer/blocks', routes.getBlocks)
.get(config.API_ENDPOINT + 'explorer/blocks/:height', routes.getBlocks)
.get(config.API_ENDPOINT + 'explorer/tx/:id', routes.getRawTransaction)
;
}
+9
View File
@@ -90,6 +90,15 @@ class Routes {
res.status(500).send(e.message);
}
}
public async getRawTransaction(req, res) {
try {
const result = await bitcoinApi.getRawTransaction(req.params.id);
res.send(result);
} catch (e) {
res.status(500).send(e.message);
}
}
}
export default new Routes();