Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create a demo progect #712

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions NBitcoin.Demo/NBitcoin.Demo.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NBitcoin\NBitcoin.csproj" />
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions NBitcoin.Demo/Program.cs
Original file line number Diff line number Diff line change
@@ -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!");
}
}
}
6 changes: 6 additions & 0 deletions NBitcoin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down