Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
with:
dotnet-version: ${{ matrix.dotnet }}

- name: Run tests (BouncyCastle)
- name: Run tests (Portability)
# we want to run only once.
if: startsWith(matrix.os, 'ubuntu-18')
run: |
dotnet build tests/DotNetLightning.Core.Tests -p:BouncyCastle=True
dotnet build tests/DotNetLightning.Core.Tests -p:Portability=True
dotnet run --no-build --project tests/DotNetLightning.Core.Tests
- name: Clean to prepare for NSec build
Expand All @@ -40,6 +40,6 @@ jobs:
run: |
DEBIAN_FRONTEND=noninteractive sudo apt install -y msbuild fsharp
dotnet restore -p:BouncyCastle=True DotNetLightning.sln
msbuild src/DotNetLightning.Core/DotNetLightning.Core.fsproj -p:BouncyCastle=True -p:TargetFramework=netstandard2.0
dotnet restore -p:Portability=True DotNetLightning.sln
msbuild src/DotNetLightning.Core/DotNetLightning.Core.fsproj -p:Portability=True -p:TargetFramework=netstandard2.0
11 changes: 3 additions & 8 deletions .github/workflows/publish_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ jobs:
with:
dotnet-version: '3.1.200'

- name: Upload nuget packages (BouncyCastle)
- name: Upload nuget packages (Portability)
if: startsWith(matrix.os, 'ubuntu')
run: |
dotnet pack ./src/DotNetLightning.Core -p:Configuration=Release --version-suffix date`date +%Y%m%d-%H%M`-git-`echo $GITHUB_SHA | head -c 7` -p:BouncyCastle=True
dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.1*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

- name: Upload nuget packages (native)
run: |
bash -c "dotnet pack ./src/DotNetLightning.Core -p:Configuration=Release --version-suffix date$(date +%Y%m%d-%H%M).git-$(git rev-parse --short=7 HEAD)-${{ matrix.RID }}"
bash -c "dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.Core.1*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json"
dotnet pack ./src/DotNetLightning.Core -p:Configuration=Release --version-suffix date`date +%Y%m%d-%H%M`-git-`echo $GITHUB_SHA | head -c 7` -p:Portability=True
dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.Kiss.1*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
10 changes: 5 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

<!-->Since NBitcoin.Secp256k1 does not support netstandard 2.0, we will fallback to BouncyCastle build<-->
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<BouncyCastle>True</BouncyCastle>
<Portability>True</Portability>
</PropertyGroup>


<Choose>
<When Condition="'$(BouncyCastle)'=='true'">
<When Condition="'$(Portability)'=='true'">
<PropertyGroup>
<OtherFlags>$(OtherFlags) -d:BouncyCastle</OtherFlags>
<DefineConstants>$(DefineConstants);BouncyCastle</DefineConstants>
<OtherFlags>$(OtherFlags) -d:NoDUsAsStructs -d:BouncyCastle</OtherFlags>
<DefineConstants>$(DefineConstants);NoDUsAsStructs;BouncyCastle</DefineConstants>
</PropertyGroup>
</When>
</Choose>

<ItemGroup>
<PackageReference Include="NBitcoin" Version="5.0.65" />
<PackageReference Condition="'$(BouncyCastle)'=='true'" Include="Portable.BouncyCastle" Version="1.8.6.7" />
<PackageReference Condition="'$(Portability)'=='true'" Include="Portable.BouncyCastle" Version="1.8.6.7" />
</ItemGroup>

<PropertyGroup>
Expand Down
28 changes: 12 additions & 16 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
MIT License
AGPL License

Copyright (c) 2020 Joe Miyamoto <[email protected]>
Copyright (c) 2020 Node Effect Ltd <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ The main entry point is `DotNetLightning.Core`.

## Installation

The package is compiled and published with two variants

* [`DotNetLightning`](https://www.nuget.org/packages/DotNetLightning/)
* This does not use native bindings for cryptographic operations.
* This is the one you want to use if you run your code everywhere, but possibly slower than below.
* [`DotNetLightning.Core`](https://www.nuget.org/packages/DotNetLightning.Core/)
* This uses a pre-compiled `libsodium` for cryptographic operations.
* It only supports `windows`, `mac` and `linux` environments.
* This is what you want if you need performance and the environments above are the only ones you are planning to support.

run `dotnet add package` with the one you want.
The package is compiled and published in nuget:

* [`DotNetLightning.Kiss`](https://www.nuget.org/packages/DotNetLightning.Kiss/)

It does not use native bindings for cryptographic operations.

Currently it is in alpha, so you probably want to install a latest version by specifying it with `--version`.
The version is prefixed with git commit hash and date. Please take a look at the nuget page.

Expand Down
Loading