I am working in C# with NBitcoin. I have created an extended master private key, and I can create the hierarchy of derived keys. In TestNet, I have requested some coin from a faucet, and the transaction has gone to the test address (checked in testnet.blockexplorer.com).

I have a local testnet chain running (and a mainnet chain, but testnet for now is all that matters) and I am trying to interact with it via the bitcoind RPC, as per the Bitcoin developer examples.

How do I work out the balance (value held) on my private key, that pairs to the public key, that generated the receiving address? Am I right in thinking that the RPC bitcoind client will not show this, as it maintains it's own keys? If so, how can I query the blockchain for transactions on this address? There is an RPC to import an address, but that seems like a kludge. I should be able to do what the bitcoin core does for it's own local addresses, but for my locally generated addresses.

Thanks in advance for any guidance.

1 Answer 1


I have since found out that you can only use the bitcoin core to find addresses that are generated in the bitcoin core wallet. You can add external addresses to the wallet, but then you need to re-index. Code changes are in the works to add addrindex=1 to the config, which will index your local chain for all addresses. Alternatively, you can use a block explorer website API service, or run Insight on your own chain. So, no easy answer. Probably best to use website APIs initially, and updated bitcoin core in the medium term.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.