Add block/:hash/tx/:txid/summary endpoint

This commit is contained in:
natsoni
2024-10-30 15:31:01 +01:00
parent f08fa034cc
commit b6aeb5661f
3 changed files with 34 additions and 0 deletions

View File

@@ -1224,6 +1224,11 @@ class Blocks {
return summary.transactions;
}
public async $getSingleTxFromSummary(hash: string, txid: string): Promise<TransactionClassified | null> {
const txs = await this.$getStrippedBlockTransactions(hash);
return txs.find(tx => tx.txid === txid) || null;
}
/**
* Get 15 blocks
*