Post
Topic
Board Development & Technical Discussion
Re: Architecture and code for retrieving Wallet Address balance and transactions
by
FiNaR76
on 16/02/2020, 10:04:40 UTC
it depends on what you you want to do with all that. you may be better off installing a decent wallet and use that. wallets usually show your transaction history with all the additional info such as fees.


Thank you for your suggestion, but I need it programmatically on a server and the address might as well change, therefore the info from a wallet cannot work...

other wise you have to read the documentation and learn how to use the command line or JSON RPC. i suppose you can do it both with your bitcoin core full node and also with using remote Electrum nodes.
core: https://bitcoin.org/en/developer-reference#bitcoin-core-apis
electrum: https://electrumx.readthedocs.io/en/latest/

in bitcoin core listaddressgroupings and listtransactions commands return list of addresses and transactions.
in electrum blockchain.scripthash.get_balance and blockchain.scripthash.get_history return address balance and transaction history (only hashes you have to get the tx separately).

this si exactly what I would need, and at the same time I would prefer not to host a full node, therefore I like the idea of connecting to an available ElectrumX node...

now the challenge starts (for me, because I am a newbie Smiley)

how do I get going about this? in a "for dummies" series, how would you start this?

I mean, lets assume I have Visual Studio Code (as my IDE), which library should I download, use,,, is there any "example" as step by step?

Thank you heaps!