Query LOCAL Bitcoin blockchain with C# .NET
Clash Royale CLAN TAG #URR8PPP Query LOCAL Bitcoin blockchain with C# .NET I am trying to check the balance of a given Bitcoin address by using ONLY the locally stored blockchain (downloaded via Bitcoin Core). Something similar to this (by using NBitCoin and/or QBitNinja), but without needing access to the network: private static readonly QBitNinjaClient client = new QBitNinjaClient(Network.Main); public decimal CheckBalance(BitcoinPubKeyAddress address) { var balanceModel = client.GetBalance(address, true).Result; decimal balance = 0; if (balanceModel.Operations.Count > 0) { var unspentCoins = new List<Coin>(); foreach (var operation in balanceModel.Operations) unspentCoins.AddRange(operation.ReceivedCoins.Select(coin => coin as Coin)); balance = unspentCoins.Sum(x => x.Amount.ToDecimal(MoneyUnit.BTC)); } return balance; } The example above needs access to the network. I need to do the same thing offline. I c...