You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm not mistaken, the btcd addrIndex only keeps a list of transactions. So it will still be necessary to loop through all the transactions when performing a lookup. For lookup performance, the index would store total_received, total_sent, final_balance... but I guess that is not presently the case and would require more storage. Also, I know that total_sent is kind of a fuzzy concept given the way bitcoin transactions work.
@Roasbeef would you care to comment on how best to implement? I figured it would basically be a matter of copying the basics of searchrawtransaction API, deserializing all transactions, and summing the amounts. Or is there a more efficient way to do it?
I might work on it myself at some point if/when I find some time. Or if someone else wishes to, all the better!
The particular use case I have in mind is for my HD wallet discovery tool. It's a general purpose api though.
I just added support within the tool to make use of btcd as a data source via searchrawtransactions, but the reports have missing data and the lookups are slow compared to bc.info and blockr. hoping to remedy that!
The text was updated successfully, but these errors were encountered:
@dan-da did you find a reliable node to provide that data? I find myself in the same situation, I need to get transaction data in batch for a HD wallet I'm developing.
@jackzampolin I meant that the reports generated by my tool are presently missing fields for total_received and balance because searchrawtransactions does not provide total_received and total_spent fields per address. Also, for performance reasons I am specifying count=1, such that only a single tx is returned. If I were willing to retrieve list of all tx (possibly thousands per addr) then I could calc these myself, this is true. I may add an option for that.
Regardless it is horribly inefficient to be making a call to retrieve N transactions for a single address vs a call to receive summarized info for multiple addresses, which is what this request is about.
I am in need of an API that leverages the addrIndex to return summarized address data for multiple addresses in a single call.
Both blockchain.info and blockr provide this capability, but I'm hoping for a solution that can be run privately inhouse.
Here is an example call from bc.info: (docs)
The blockr api is similar, and docs are here.
If I'm not mistaken, the btcd addrIndex only keeps a list of transactions. So it will still be necessary to loop through all the transactions when performing a lookup. For lookup performance, the index would store total_received, total_sent, final_balance... but I guess that is not presently the case and would require more storage. Also, I know that total_sent is kind of a fuzzy concept given the way bitcoin transactions work.
@Roasbeef would you care to comment on how best to implement? I figured it would basically be a matter of copying the basics of searchrawtransaction API, deserializing all transactions, and summing the amounts. Or is there a more efficient way to do it?
I might work on it myself at some point if/when I find some time. Or if someone else wishes to, all the better!
The particular use case I have in mind is for my HD wallet discovery tool. It's a general purpose api though.
I just added support within the tool to make use of btcd as a data source via searchrawtransactions, but the reports have missing data and the lookups are slow compared to bc.info and blockr. hoping to remedy that!
The text was updated successfully, but these errors were encountered: