7
1
Is there a way to scan the Bitcoin blockchain in C# without using an external API? I am looking for the amount of spendable money of a Bitcoin address.
I am using NBitcoin.
// create new key pair based on private key
NBitcoin.Key key = new NBitcoin.Key(privateKey, privateKey.Length, false);
// parse blk*.dat
// get balance for address key.PubKey.Hash
// How to do that?
Yes, this is certainly possible to do. The blockchain contains all the information needed. – Greg Hewgill – 2015-06-15T22:16:56.843
@GregHewgill how he will query blockchain with NBitcoin? – Igor Barinov – 2015-06-16T01:18:54.207
I'm afraid I don't know anything about how to use NBitcoin specifically. However, I've done exactly this with Python (for the blockchain of a different coin, but the structure is largely the same), so it's certainly possible. – Greg Hewgill – 2015-06-16T01:20:34.160
http://www.codeproject.com/Articles/784519/NBitcoin-How-to-scan-the-Blockchain – Xawery Wiśniowiecki – 2015-07-26T11:58:12.213