Open winteraz opened 6 years ago
I'm need to get the UTXO of arbitrary addresses akin blockchain.info api call[0]. Is this possible with btcsuite?
[0] https://blockchain.info/api/blockchain_api Unspent outputs
https://blockchain.info/unspent?active=$address Multiple Addresses Allowed separated by "|" Address can be base58 or xpub
{ "unspent_outputs":[ { "tx_age":"1322659106", "tx_hash":"e6452a2cb71aa864aaa959e647e7a4726a22e640560f199f79b56b5502114c37", "tx_index":"12790219", "tx_output_n":"0", "script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac", (Hex encoded) "value":"5000661330" } ] }
See the gettxout RPC command. Or even the address index depending on your use case.
gettxout
In my gRPC PR, I implemented a method GetAddressUnspentOutputs to get all unspent outputs for a given address.
GetAddressUnspentOutputs
In this PR a method is implemented (also for gRPC) that allows retrieving the entire UTXO set.
This would be pretty handy. I think it'd allow btcd to work in place of Insight for the most part.
I'm need to get the UTXO of arbitrary addresses akin blockchain.info api call[0]. Is this possible with btcsuite?
[0] https://blockchain.info/api/blockchain_api Unspent outputs