janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.5k stars 1.11k forks source link

tx api: add address, type, value to vin. add fee. #434

Closed pointbiz closed 2 years ago

pointbiz commented 2 years ago

This pull requests adds the address, value and type information to vin for a transaction api results. This way the caller does not have to make multiple calls to get the vin information to get addresses and calculate the fee. I have calculated the fee and added it to the results as well.

This scenario came up when attempting to consume the tx API in my bitcoin-reports.com project.

dykstranet commented 2 years ago

I tested this and, indeed it gives trx value and fee value that I needed. Would be nice to see this merged. Thanks for the help!

pointbiz commented 2 years ago

@janoside Would you have time to consider this PR for the next release?