Commit fc9814a6 authored by Jeremy Bokobza's avatar Jeremy Bokobza

Added Api as a feature of the Full Node

parent ead042b2
......@@ -257,3 +257,4 @@ ModelManifest.xml
# DNX
project.lock.json
/Breeze/src/Breeze.Deamon/Wallets
using Stratis.Bitcoin.Builder;
using Stratis.Bitcoin.Builder.Feature;
namespace Breeze.Api
{
public class ApiFeature : FullNodeFeature
{
public override void Start()
{
Program.Main(null);
}
}
public static class ApiFeatureExtension
{
public static IFullNodeBuilder UseApi(this IFullNodeBuilder fullNodeBuilder)
{
fullNodeBuilder.ConfigureFeature(features =>
{
features
.AddFeature<ApiFeature>()
.FeatureServices(services =>
{
});
});
return fullNodeBuilder;
}
}
}
......@@ -14,6 +14,7 @@
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.1",
"Microsoft.NETCore.App": "1.1.0",
"NBitcoin": "3.0.2.10",
"Stratis.Bitcoin": "1.0.1.2-alpha",
"System.Reactive": "3.1.1"
},
......
using System.Threading;
using Breeze.Api;
using Microsoft.Extensions.Logging;
using Stratis.Bitcoin;
using Stratis.Bitcoin.Builder;
......@@ -18,7 +19,7 @@ namespace Breeze.Deamon
var node = (FullNode)new FullNodeBuilder()
.UseNodeSettings(nodeSettings)
//.UseWallet()
//.UseApi()
.UseApi()
//.UseBlockNotification()
.Build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment