Add API endpoint for block summary data

This commit is contained in:
Mononaut
2022-06-15 19:53:37 +00:00
parent 2d529bd581
commit 288bddcaf2
6 changed files with 77 additions and 3 deletions

View File

@@ -314,7 +314,8 @@ class Server {
this.app
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks', routes.getBlocks.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/:height', routes.getBlocks.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash', routes.getBlock);
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash', routes.getBlock)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/summary', routes.getStrippedBlockTransactions);
if (config.MEMPOOL.BACKEND !== 'esplora') {
this.app