btcsuite / btcwallet

A secure bitcoin wallet daemon written in Go (golang)
ISC License
1.13k stars 576 forks source link

[golang] get an addresse's full tx history #938

Closed r3nor closed 2 months ago

r3nor commented 3 months ago

i am trying to use this as a golang module for an app, I am wondering how can I get the full tx history for an address without needing to go through all addresses of the wallet, just get that addresse's transactions

r3nor commented 3 months ago

i have tried using listbyaddress, but the function from the btcwallet client does not accept any parameter and it returns all the tx from all addressses

Roasbeef commented 2 months ago

You can use the address index in btcd for that: https://github.com/btcsuite/btcd/blob/master/sample-btcd.conf#L276-L278