diff --git a/NBitcoin.Demo/NBitcoin.Demo.csproj b/NBitcoin.Demo/NBitcoin.Demo.csproj new file mode 100644 index 0000000000..39e706da12 --- /dev/null +++ b/NBitcoin.Demo/NBitcoin.Demo.csproj @@ -0,0 +1,16 @@ + + + + Exe + netcoreapp2.1 + + + + + + + + + + + diff --git a/NBitcoin.Demo/Program.cs b/NBitcoin.Demo/Program.cs new file mode 100644 index 0000000000..f2542714a3 --- /dev/null +++ b/NBitcoin.Demo/Program.cs @@ -0,0 +1,17 @@ +using NBitcoin.RPC; +using Newtonsoft.Json; +using System; +using System.Net; + +namespace NBitcoin.Demo +{ + class Program + { + static void Main(string[] args) + { + RPCClient client = new RPCClient(new NetworkCredential("amo2017", "amo123456"), "127.0.0.1:8332", Network.Main); + Console.WriteLine(JsonConvert.SerializeObject(client.ListAccounts())); + Console.WriteLine("Hello World!"); + } + } +} diff --git a/NBitcoin.sln b/NBitcoin.sln index 4eed584aa6..6ca28a25b0 100644 --- a/NBitcoin.sln +++ b/NBitcoin.sln @@ -18,6 +18,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin.Altcoins", "NBitco EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin.TestFramework", "NBitcoin.TestFramework\NBitcoin.TestFramework.csproj", "{653C0F21-25FE-4B72-95AC-20D070A45415}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBitcoin.Demo", "NBitcoin.Demo\NBitcoin.Demo.csproj", "{07F1F092-C4AB-480B-89F2-2F11127231EF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -40,6 +42,10 @@ Global {653C0F21-25FE-4B72-95AC-20D070A45415}.Debug|Any CPU.Build.0 = Debug|Any CPU {653C0F21-25FE-4B72-95AC-20D070A45415}.Release|Any CPU.ActiveCfg = Release|Any CPU {653C0F21-25FE-4B72-95AC-20D070A45415}.Release|Any CPU.Build.0 = Release|Any CPU + {07F1F092-C4AB-480B-89F2-2F11127231EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07F1F092-C4AB-480B-89F2-2F11127231EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07F1F092-C4AB-480B-89F2-2F11127231EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07F1F092-C4AB-480B-89F2-2F11127231EF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE