Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
f24e1da0
Commit
f24e1da0
authored
Apr 21, 2017
by
Pieterjan Vanhoof
Committed by
GitHub
Apr 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Add Wallet Manager (#33)
Add Wallet Manager
parents
1563efa9
c5350c48
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
104 additions
and
312 deletions
+104
-312
Breeze.sln
Breeze/Breeze.sln
+8
-7
Breeze.vs2017.sln
Breeze/Breeze.vs2017.sln
+0
-54
global.json
Breeze/global.json
+2
-5
Breeze.Api.Tests.csproj
Breeze/src/Breeze.Api.Tests/Breeze.Api.Tests.csproj
+1
-0
Breeze.Api.Tests.xproj
Breeze/src/Breeze.Api.Tests/Breeze.Api.Tests.xproj
+0
-21
project.json
Breeze/src/Breeze.Api.Tests/project.json
+0
-25
Breeze.Api.csproj
Breeze/src/Breeze.Api/Breeze.Api.csproj
+2
-3
Breeze.Api.xproj
Breeze/src/Breeze.Api/Breeze.Api.xproj
+0
-19
project.json
Breeze/src/Breeze.Api/project.json
+0
-65
Breeze.Deamon.csproj
Breeze/src/Breeze.Deamon/Breeze.Deamon.csproj
+1
-1
Breeze.Deamon.xproj
Breeze/src/Breeze.Deamon/Breeze.Deamon.xproj
+0
-21
Program.cs
Breeze/src/Breeze.Deamon/Program.cs
+3
-2
project.json
Breeze/src/Breeze.Deamon/project.json
+0
-27
Breeze.Wallet.csproj
Breeze/src/Breeze.Wallet/Breeze.Wallet.csproj
+1
-3
Breeze.Wallet.xproj
Breeze/src/Breeze.Wallet/Breeze.Wallet.xproj
+0
-21
TransactionObserver.cs
...ze/src/Breeze.Wallet/Notifications/TransactionObserver.cs
+28
-0
TransactionSubscriber.cs
.../src/Breeze.Wallet/Notifications/TransactionSubscriber.cs
+30
-0
WalletFeature.cs
Breeze/src/Breeze.Wallet/WalletFeature.cs
+2
-0
ITrackerWrapper.cs
Breeze/src/Breeze.Wallet/Wrappers/ITrackerWrapper.cs
+3
-1
IWalletWrapper.cs
Breeze/src/Breeze.Wallet/Wrappers/IWalletWrapper.cs
+1
-3
TrackerWrapper.cs
Breeze/src/Breeze.Wallet/Wrappers/TrackerWrapper.cs
+22
-16
WalletWrapper.cs
Breeze/src/Breeze.Wallet/Wrappers/WalletWrapper.cs
+0
-1
project.json
Breeze/src/Breeze.Wallet/project.json
+0
-17
No files found.
Breeze/Breeze.sln
View file @
f24e1da0
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 1
4
VisualStudioVersion = 1
4.0.25420.1
# Visual Studio 1
5
VisualStudioVersion = 1
5.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{807563C4-7259-434D-B604-A14C3DCF8E30}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "
Solution Items", "Solution Items
", "{2FF3130A-E8F3-4E0B-8733-B34C4A19910C}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "
global", "global
", "{2FF3130A-E8F3-4E0B-8733-B34C4A19910C}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
global.json = global.json
EndProjectSection
EndProject
Project("{
8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Breeze.Api", "src\Breeze.Api\Breeze.Api.x
proj", "{E7B3E9EB-34E8-4B10-B296-4D5270E314A4}"
Project("{
9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Api", "src\Breeze.Api\Breeze.Api.cs
proj", "{E7B3E9EB-34E8-4B10-B296-4D5270E314A4}"
EndProject
Project("{
8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Breeze.Api.Tests", "src\Breeze.Api.Tests\Breeze.Api.Tests.x
proj", "{BD5174B4-DCE8-4594-9A16-B83E56767770}"
Project("{
9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Api.Tests", "src\Breeze.Api.Tests\Breeze.Api.Tests.cs
proj", "{BD5174B4-DCE8-4594-9A16-B83E56767770}"
EndProject
Project("{
8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Breeze.Wallet", "src\Breeze.Wallet\Breeze.Wallet.x
proj", "{D16CD478-9D1E-4C69-91AD-43539E94A215}"
Project("{
9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Wallet", "src\Breeze.Wallet\Breeze.Wallet.cs
proj", "{D16CD478-9D1E-4C69-91AD-43539E94A215}"
EndProject
Project("{
8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Breeze.Deamon", "src\Breeze.Deamon\Breeze.Deamon.x
proj", "{1B598E33-667F-496D-BC0D-88276E8E7632}"
Project("{
9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Deamon", "src\Breeze.Deamon\Breeze.Deamon.cs
proj", "{1B598E33-667F-496D-BC0D-88276E8E7632}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
...
...
Breeze/Breeze.vs2017.sln
deleted
100644 → 0
View file @
1563efa9
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{807563C4-7259-434D-B604-A14C3DCF8E30}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{2FF3130A-E8F3-4E0B-8733-B34C4A19910C}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
global.json = global.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Api", "src\Breeze.Api\Breeze.Api.csproj", "{E7B3E9EB-34E8-4B10-B296-4D5270E314A4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Api.Tests", "src\Breeze.Api.Tests\Breeze.Api.Tests.csproj", "{BD5174B4-DCE8-4594-9A16-B83E56767770}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Wallet", "src\Breeze.Wallet\Breeze.Wallet.csproj", "{D16CD478-9D1E-4C69-91AD-43539E94A215}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Deamon", "src\Breeze.Deamon\Breeze.Deamon.csproj", "{1B598E33-667F-496D-BC0D-88276E8E7632}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E7B3E9EB-34E8-4B10-B296-4D5270E314A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7B3E9EB-34E8-4B10-B296-4D5270E314A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7B3E9EB-34E8-4B10-B296-4D5270E314A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7B3E9EB-34E8-4B10-B296-4D5270E314A4}.Release|Any CPU.Build.0 = Release|Any CPU
{BD5174B4-DCE8-4594-9A16-B83E56767770}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD5174B4-DCE8-4594-9A16-B83E56767770}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD5174B4-DCE8-4594-9A16-B83E56767770}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD5174B4-DCE8-4594-9A16-B83E56767770}.Release|Any CPU.Build.0 = Release|Any CPU
{D16CD478-9D1E-4C69-91AD-43539E94A215}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D16CD478-9D1E-4C69-91AD-43539E94A215}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D16CD478-9D1E-4C69-91AD-43539E94A215}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D16CD478-9D1E-4C69-91AD-43539E94A215}.Release|Any CPU.Build.0 = Release|Any CPU
{1B598E33-667F-496D-BC0D-88276E8E7632}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B598E33-667F-496D-BC0D-88276E8E7632}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B598E33-667F-496D-BC0D-88276E8E7632}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B598E33-667F-496D-BC0D-88276E8E7632}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E7B3E9EB-34E8-4B10-B296-4D5270E314A4} = {807563C4-7259-434D-B604-A14C3DCF8E30}
{BD5174B4-DCE8-4594-9A16-B83E56767770} = {807563C4-7259-434D-B604-A14C3DCF8E30}
{D16CD478-9D1E-4C69-91AD-43539E94A215} = {807563C4-7259-434D-B604-A14C3DCF8E30}
{1B598E33-667F-496D-BC0D-88276E8E7632} = {807563C4-7259-434D-B604-A14C3DCF8E30}
EndGlobalSection
EndGlobal
Breeze/global.json
View file @
f24e1da0
{
"projects"
:
[
"src"
],
"sdk"
:
{
"version"
:
"1.0.0-preview2-003131"
}
}
"projects"
:
[
"src"
]
}
Breeze/src/Breeze.Api.Tests/Breeze.Api.Tests.csproj
View file @
f24e1da0
...
...
@@ -16,6 +16,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
<PackageReference Include="NStratis" Version="3.0.2.17" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta5-build1225" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
...
...
Breeze/src/Breeze.Api.Tests/Breeze.Api.Tests.xproj
deleted
100644 → 0
View file @
1563efa9
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0.25420"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<VisualStudioVersion
Condition=
"'$(VisualStudioVersion)' == ''"
>
14.0.25420
</VisualStudioVersion>
<VSToolsPath
Condition=
"'$(VSToolsPath)' == ''"
>
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
</VSToolsPath>
</PropertyGroup>
<Import
Project=
"$(VSToolsPath)\DotNet\Microsoft.DotNet.Props"
Condition=
"'$(VSToolsPath)' != ''"
/>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
bd5174b4-dce8-4594-9a16-b83e56767770
</ProjectGuid>
<RootNamespace>
Breeze.Api.Tests
</RootNamespace>
<BaseIntermediateOutputPath
Condition=
"'$(BaseIntermediateOutputPath)'=='' "
>
.\obj
</BaseIntermediateOutputPath>
<OutputPath
Condition=
"'$(OutputPath)'=='' "
>
.\bin\
</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>
2.0
</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service
Include=
"{82a7f48d-3b50-4b1e-b82e-3ada8210c358}"
/>
</ItemGroup>
<Import
Project=
"$(VSToolsPath)\DotNet\Microsoft.DotNet.targets"
Condition=
"'$(VSToolsPath)' != ''"
/>
</Project>
\ No newline at end of file
Breeze/src/Breeze.Api.Tests/project.json
deleted
100644 → 0
View file @
1563efa9
{
"version"
:
"1.0.0-*"
,
"dependencies"
:
{
"System.Runtime.Serialization.Primitives"
:
"4.3.0"
,
"xunit"
:
"2.2.0"
,
"dotnet-test-xunit"
:
"1.0.0-rc2-build10025"
,
"Breeze.Api"
:
"1.0.0-*"
,
"Microsoft.DotNet.InternalAbstractions"
:
"1.0.0"
,
"Moq"
:
"4.7.8"
,
"Breeze.Wallet"
:
"1.0.0-*"
},
"testRunner"
:
"xunit"
,
"frameworks"
:
{
"netcoreapp1.0"
:
{
"dependencies"
:
{
"Microsoft.NETCore.App"
:
{
"type"
:
"platform"
,
"version"
:
"1.1.0"
}
},
"imports"
:
[
"netcore50"
]
}
}
}
Breeze/src/Breeze.Api/Breeze.Api.csproj
View file @
f24e1da0
...
...
@@ -6,7 +6,7 @@
<AssemblyName>Breeze.Api</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Breeze.Api</PackageId>
<RuntimeIdentifiers>win10-x64;win7-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win10-x64;win7-x64
;ubuntu.16.04-x64
</RuntimeIdentifiers>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
...
...
@@ -29,8 +29,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.1" />
<PackageReference Include="NBitcoin" Version="3.0.2.15" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.3-alpha" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.5-alpha" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0-rc3" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
...
...
Breeze/src/Breeze.Api/Breeze.Api.xproj
deleted
100644 → 0
View file @
1563efa9
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<VisualStudioVersion
Condition=
"'$(VisualStudioVersion)' == ''"
>
14.0
</VisualStudioVersion>
<VSToolsPath
Condition=
"'$(VSToolsPath)' == ''"
>
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
</VSToolsPath>
</PropertyGroup>
<Import
Project=
"$(VSToolsPath)\DotNet\Microsoft.DotNet.Props"
Condition=
"'$(VSToolsPath)' != ''"
/>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
e7b3e9eb-34e8-4b10-b296-4d5270e314a4
</ProjectGuid>
<RootNamespace>
Breeze.Api
</RootNamespace>
<BaseIntermediateOutputPath
Condition=
"'$(BaseIntermediateOutputPath)'=='' "
>
.\obj
</BaseIntermediateOutputPath>
<OutputPath
Condition=
"'$(OutputPath)'=='' "
>
.\bin\
</OutputPath>
<TargetFrameworkVersion>
v4.6
</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>
2.0
</SchemaVersion>
</PropertyGroup>
<Import
Project=
"$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets"
Condition=
"'$(VSToolsPath)' != ''"
/>
</Project>
Breeze/src/Breeze.Api/project.json
deleted
100644 → 0
View file @
1563efa9
{
"dependencies"
:
{
"Microsoft.AspNetCore.Mvc"
:
"1.1.2"
,
"Microsoft.AspNetCore.Mvc.Versioning"
:
"1.0.3"
,
"Microsoft.AspNetCore.Routing"
:
"1.1.1"
,
"Microsoft.AspNetCore.Server.IISIntegration"
:
"1.1.1"
,
"Microsoft.AspNetCore.Server.Kestrel"
:
"1.1.1"
,
"Microsoft.Extensions.Configuration.EnvironmentVariables"
:
"1.1.1"
,
"Microsoft.Extensions.Configuration.FileExtensions"
:
"1.1.1"
,
"Microsoft.Extensions.Configuration.Json"
:
"1.1.1"
,
"Microsoft.Extensions.DependencyModel"
:
"1.1.1"
,
"Microsoft.Extensions.Logging"
:
"1.1.1"
,
"Microsoft.Extensions.Logging.Console"
:
"1.1.1"
,
"Microsoft.Extensions.Logging.Debug"
:
"1.1.1"
,
"Microsoft.Extensions.Options.ConfigurationExtensions"
:
"1.1.1"
,
"Microsoft.NETCore.App"
:
"1.1.0"
,
"NBitcoin"
:
"3.0.2.15"
,
"Stratis.Bitcoin"
:
"1.0.1.3-alpha"
,
"Swashbuckle.AspNetCore"
:
"1.0.0-rc3"
,
"System.Reactive"
:
"3.1.1"
,
"System.Runtime.Loader"
:
"4.3.0"
},
"tools"
:
{
"Microsoft.AspNetCore.Server.IISIntegration.Tools"
:
"1.0.0-preview2-final"
},
"frameworks"
:
{
"netcoreapp1.0"
:
{
"imports"
:
[
"dotnet5.6"
,
"portable-net45+win8"
]
}
},
"buildOptions"
:
{
"emitEntryPoint"
:
true
,
"preserveCompilationContext"
:
true
},
"runtimeOptions"
:
{
"configProperties"
:
{
"System.GC.Server"
:
true
}
},
"publishOptions"
:
{
"include"
:
[
"wwwroot"
,
"**/*.cshtml"
,
"appsettings.json"
,
"web.config"
]
},
"scripts"
:
{
"postpublish"
:
[
"dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
]
},
"runtimes"
:
{
"win10-x64"
:
{},
"win7-x64"
:
{},
"ubuntu.16.04-x64"
:
{}
}
}
Breeze/src/Breeze.Deamon/Breeze.Deamon.csproj
View file @
f24e1da0
...
...
@@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.
3
-alpha" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.
5
-alpha" />
</ItemGroup>
</Project>
Breeze/src/Breeze.Deamon/Breeze.Deamon.xproj
deleted
100644 → 0
View file @
1563efa9
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<VisualStudioVersion
Condition=
"'$(VisualStudioVersion)' == ''"
>
14.0
</VisualStudioVersion>
<VSToolsPath
Condition=
"'$(VSToolsPath)' == ''"
>
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
</VSToolsPath>
</PropertyGroup>
<Import
Project=
"$(VSToolsPath)\DotNet\Microsoft.DotNet.Props"
Condition=
"'$(VSToolsPath)' != ''"
/>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
1b598e33-667f-496d-bc0d-88276e8e7632
</ProjectGuid>
<RootNamespace>
Breeze.Deamon
</RootNamespace>
<BaseIntermediateOutputPath
Condition=
"'$(BaseIntermediateOutputPath)'=='' "
>
.\obj
</BaseIntermediateOutputPath>
<OutputPath
Condition=
"'$(OutputPath)'=='' "
>
.\bin\
</OutputPath>
<TargetFrameworkVersion>
v4.5.2
</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>
2.0
</SchemaVersion>
</PropertyGroup>
<Import
Project=
"$(VSToolsPath)\DotNet\Microsoft.DotNet.targets"
Condition=
"'$(VSToolsPath)' != ''"
/>
</Project>
Breeze/src/Breeze.Deamon/Program.cs
View file @
f24e1da0
...
...
@@ -18,11 +18,12 @@ namespace Breeze.Deamon
// configure Full Node
Logs
.
Configure
(
new
LoggerFactory
().
AddConsole
(
LogLevel
.
Trace
,
false
));
NodeSettings
nodeSettings
=
NodeSettings
.
FromArguments
(
args
);
var
node
=
(
FullNode
)
new
FullNodeBuilder
()
var
node
=
(
FullNode
)
new
FullNodeBuilder
()
.
UseNodeSettings
(
nodeSettings
)
.
UseWallet
()
.
UseBlockNotification
()
.
UseTransactionNotification
()
.
UseApi
()
.
Build
();
...
...
Breeze/src/Breeze.Deamon/project.json
deleted
100644 → 0
View file @
1563efa9
{
"title"
:
""
,
"version"
:
"1.0.0-*"
,
"buildOptions"
:
{
"emitEntryPoint"
:
true
//
TODO
uncomment
the
line
below
when
we
move
to
VS
2017
(https
:
//github.com/aspnet/Tooling/issues/
842
)
//
"outputName"
:
"breezed"
},
"dependencies"
:
{
"Breeze.Api"
:
"1.0.0-*"
,
"Breeze.Wallet"
:
"1.0.0-*"
,
"Microsoft.Extensions.Logging.Abstractions"
:
"1.1.1"
,
"Microsoft.Extensions.Logging.Console"
:
"1.1.1"
,
"Microsoft.NETCore.App"
:
{
"type"
:
"platform"
,
"version"
:
"1.1.0"
},
"Stratis.Bitcoin"
:
"1.0.1.3-alpha"
},
"frameworks"
:
{
"netcoreapp1.0"
:
{
"imports"
:
"dnxcore50"
}
}
}
Breeze/src/Breeze.Wallet/Breeze.Wallet.csproj
View file @
f24e1da0
...
...
@@ -16,10 +16,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HBitcoin" Version="0.1.6" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="1.0.3" />
<PackageReference Include="NBitcoin" Version="3.0.2.15" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.3-alpha" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.5-alpha" />
</ItemGroup>
</Project>
Breeze/src/Breeze.Wallet/Breeze.Wallet.xproj
deleted
100644 → 0
View file @
1563efa9
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<VisualStudioVersion
Condition=
"'$(VisualStudioVersion)' == ''"
>
14.0
</VisualStudioVersion>
<VSToolsPath
Condition=
"'$(VSToolsPath)' == ''"
>
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
</VSToolsPath>
</PropertyGroup>
<Import
Project=
"$(VSToolsPath)\DotNet\Microsoft.DotNet.Props"
Condition=
"'$(VSToolsPath)' != ''"
/>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
d16cd478-9d1e-4c69-91ad-43539e94a215
</ProjectGuid>
<RootNamespace>
Breeze.Wallet
</RootNamespace>
<BaseIntermediateOutputPath
Condition=
"'$(BaseIntermediateOutputPath)'=='' "
>
.\obj
</BaseIntermediateOutputPath>
<OutputPath
Condition=
"'$(OutputPath)'=='' "
>
.\bin\
</OutputPath>
<TargetFrameworkVersion>
v4.5.2
</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>
2.0
</SchemaVersion>
</PropertyGroup>
<Import
Project=
"$(VSToolsPath)\DotNet\Microsoft.DotNet.targets"
Condition=
"'$(VSToolsPath)' != ''"
/>
</Project>
Breeze/src/Breeze.Wallet/Notifications/TransactionObserver.cs
0 → 100644
View file @
f24e1da0
using
NBitcoin
;
using
Stratis.Bitcoin
;
using
Breeze.Wallet.Wrappers
;
namespace
Breeze.Wallet.Notifications
{
/// <summary>
/// Observer that receives notifications about the arrival of new <see cref="Transaction"/>s.
/// </summary>
public
class
TransactionObserver
:
SignalObserver
<
Transaction
>
{
private
readonly
ITrackerWrapper
trackerWrapper
;
public
TransactionObserver
(
ITrackerWrapper
trackerWrapper
)
{
this
.
trackerWrapper
=
trackerWrapper
;
}
/// <summary>
/// Manages what happens when a new transaction is received.
/// </summary>
/// <param name="transaction">The new transaction</param>
protected
override
void
OnNextCore
(
Transaction
transaction
)
{
this
.
trackerWrapper
.
NotifyAboutTransaction
(
transaction
);
}
}
}
Breeze/src/Breeze.Wallet/Notifications/TransactionSubscriber.cs
0 → 100644
View file @
f24e1da0
using
Stratis.Bitcoin
;
using
System
;
using
NBitcoin
;
namespace
Breeze.Wallet.Notifications
{
/// <summary>
/// Manages the subscription of the transaction observer to the transaction signaler.
/// </summary>
public
class
TransactionSubscriber
{
private
readonly
ISignaler
<
Transaction
>
signaler
;
private
readonly
TransactionObserver
observer
;
public
TransactionSubscriber
(
ISignaler
<
Transaction
>
signaler
,
TransactionObserver
observer
)
{
this
.
signaler
=
signaler
;
this
.
observer
=
observer
;
}
/// <summary>
/// Subscribes the transaction observer to the transaction signaler.
/// </summary>
/// <returns>An <see cref="IDisposable"/></returns>
public
IDisposable
Subscribe
()
{
return
this
.
signaler
.
Subscribe
(
this
.
observer
);
}
}
}
Breeze/src/Breeze.Wallet/WalletFeature.cs
View file @
f24e1da0
...
...
@@ -26,6 +26,8 @@ namespace Breeze.Wallet
{
BlockSubscriber
sub
=
new
BlockSubscriber
(
signals
.
Blocks
,
new
BlockObserver
(
chain
,
trackerWrapper
));
sub
.
Subscribe
();
TransactionSubscriber
txSub
=
new
TransactionSubscriber
(
signals
.
Transactions
,
new
TransactionObserver
(
trackerWrapper
));
txSub
.
Subscribe
();
}
}
...
...
Breeze/src/Breeze.Wallet/Wrappers/ITrackerWrapper.cs
View file @
f24e1da0
...
...
@@ -6,6 +6,8 @@ namespace Breeze.Wallet.Wrappers
{
void
NotifyAboutBlock
(
int
height
,
Block
block
);
uint256
GetLastProcessedBlock
();
void
NotifyAboutTransaction
(
Transaction
transaction
);
uint256
GetLastProcessedBlock
();
}
}
Breeze/src/Breeze.Wallet/Wrappers/IWalletWrapper.cs
View file @
f24e1da0
using
Breeze.Wallet.Models
;
using
HBitcoin.Models
;
using
Breeze.Wallet.Models
;
using
NBitcoin
;
namespace
Breeze.Wallet.Wrappers
...
...
Breeze/src/Breeze.Wallet/Wrappers/TrackerWrapper.cs
View file @
f24e1da0
using
NBitcoin
;
using
HBitcoin.FullBlockSpv
;
using
HBitcoin.Models
;
using
System
;
namespace
Breeze.Wallet.Wrappers
{
public
class
TrackerWrapper
:
ITrackerWrapper
{
private
readonly
Tracker
tracker
;
//
private readonly Tracker tracker;
public
TrackerWrapper
(
Network
network
)
{
this
.
tracker
=
new
Tracker
(
network
);
//
this.tracker = new Tracker(network);
}
/// <summary>
/// Get the hash of the last block that has been succesfully processed.
/// </summary>
/// <returns>The hash of the block</returns>
public
uint256
GetLastProcessedBlock
()
{
// TODO use Tracker.BestHeight. Genesis hash for now.
return
uint256
.
Parse
(
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
);
}
/// <summary>
/// Get the hash of the last block that has been succesfully processed.
/// </summary>
/// <returns>The hash of the block</returns>
public
uint256
GetLastProcessedBlock
()
{
// TODO use Tracker.BestHeight. Genesis hash for now.
return
uint256
.
Parse
(
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
);
}
public
void
NotifyAboutBlock
(
int
height
,
Block
block
)
{
// this.tracker.AddOrReplaceBlock(new Height(height), block);
Console
.
WriteLine
(
$"block notification: height:
{
height
}
, block hash:
{
block
.
Header
.
GetHash
()}
"
);
}
public
void
NotifyAboutBlock
(
int
height
,
Block
block
)
public
void
NotifyAboutTransaction
(
Transaction
transaction
)
{
this
.
tracker
.
AddOrReplaceBlock
(
new
Height
(
height
),
block
);
Console
.
WriteLine
(
$"height:
{
height
}
, block hash:
{
block
.
Header
.
GetHash
()}
"
);
// TODO what should the height be? is it necessary?
// this.tracker.ProcessTransaction(new SmartTransaction(transaction, new Height(0)));
Console
.
WriteLine
(
$"transaction notification: tx hash
{
transaction
.
GetHash
()}
"
);
}
}
}
Breeze/src/Breeze.Wallet/Wrappers/WalletWrapper.cs
View file @
f24e1da0
...
...
@@ -3,7 +3,6 @@ using System.IO;
using
System.Linq
;
using
Breeze.Wallet.Helpers
;
using
Breeze.Wallet.Models
;
using
HBitcoin.KeyManagement
;
using
NBitcoin
;
namespace
Breeze.Wallet.Wrappers
...
...
Breeze/src/Breeze.Wallet/project.json
deleted
100644 → 0
View file @
1563efa9
{
"version"
:
"1.0.0-*"
,
"dependencies"
:
{
"HBitcoin"
:
"0.1.6"
,
"Microsoft.AspNetCore.Mvc.Versioning"
:
"1.0.3"
,
"NBitcoin"
:
"3.0.2.15"
,
"NETStandard.Library"
:
"1.6.1"
,
"Stratis.Bitcoin"
:
"1.0.1.3-alpha"
},
"frameworks"
:
{
"netstandard1.6"
:
{
"imports"
:
"dnxcore50"
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment