- // https://www.dropbox.com/s/f7ucj1366lcp8il/ElectrumPortable.zip?dl=0
- // Download & extract. Password is Applesauce1979
- // Open portable wallet, send 0.01 BTC to Test Address
- // Do not send more than 0.01 BTC, this is a shared wallet. Respect your fellow students.
- // Once you have received the Bitcoin, run the following code to check the balance.
- // If you have trouble with running this code please send me an e-mail.
- // Your student laptop has this add-on pre-installed.
- using System;
- using System.Linq;
- using Info.Blockchain.API.Client;
- using Info.Blockchain.API.BlockExplorer;
- namespace TestApp
- {
- class Program
- {
- private static BlockExplorer explorer;
- static void Main(string[] args)
- {
- try
- {
- explorer = new BlockExplorer();
- // calculate the balanace of an address by fetching a list of all its unspent outputs
- var outs = explorer.GetUnspentOutputsAsync("13k5KUK2vswXRdjgjxgCorGoY2EFGMFTnu").Result;
- var totalUnspentValue = outs.Sum(v => v.Value.GetBtc());
- }
- catch (ClientApiException e)
- {
- Console.WriteLine("Blockchain exception: " + e.Message);
- }
- }
- }
- }
bitcoin test file