Author

Topic: Questions for developing application for bitcoin (Read 146 times)

legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
September 27, 2018, 01:28:57 AM
#4
While researching I've found this "Bitcoin transaction explorer" code.
What caught my eyes and may be interesting for this topic was:
Quote
If this explorer is run on top of a node that has an address index such as this one: https://github.com/btcdrak/bitcoin/tree/addrindex-0.11 then this explorer will be able to look up the balance of an address and show every output associated with it.
The problem is that I didn't understand that "address index" part, nor what's at that link. However, it can be a direction...
newbie
Activity: 16
Merit: 1
In order to get balance for an address that isn't in your wallet in Bitcoin Core, you need to import it first and do a rescan of the blockchain.

Can above be done programmatically? If yes, would it slow down the execution significantly?
sr. member
Activity: 490
Merit: 389
Do not trust the government
In order to get balance for an address that isn't in your wallet in Bitcoin Core, you need to import it first and do a rescan of the blockchain.

You can use importaddress command for this, which will by default do a rescan automatically once the address is imported, unless specified otherwise in an argument.

Furthermore, when checking the balance of an address with getbalance command, you need to set include_watchonly argument to true, in case you imported an address without importing it's private keys.
newbie
Activity: 16
Merit: 1
I am new to bitcoin world. I want to set up a local bitcoin full running node and develop my Node JS code talks to node, and provides web api for:
1) Getting balance for any bitcoin address
2) Doing a transfer of bitcoins from any account to any other account. (It may need private key of sender for transfer)

I tried bitcoin core earlier, but seems I can not get balance of any address there.

I will really appreciate any pointers how can I achieve this.

Thanks,
Jessica
Jump to: