NLightning.Infrastructure.Blazor
0.0.1
NLightning.Infrastructure.Blazor 0.0.2
Additional DetailsThis package doesn't work with Blazor WebAssembly Apps using the framework `net9.0`. Please install the latest version to publish Blazor WebAssembly Apps.
See the version list below for details.
dotnet add package NLightning.Infrastructure.Blazor --version 0.0.1
NuGet\Install-Package NLightning.Infrastructure.Blazor -Version 0.0.1
<PackageReference Include="NLightning.Infrastructure.Blazor" Version="0.0.1" />
<PackageVersion Include="NLightning.Infrastructure.Blazor" Version="0.0.1" />
<PackageReference Include="NLightning.Infrastructure.Blazor" />
paket add NLightning.Infrastructure.Blazor --version 0.0.1
#r "nuget: NLightning.Infrastructure.Blazor, 0.0.1"
#:package NLightning.Infrastructure.Blazor@0.0.1
#addin nuget:?package=NLightning.Infrastructure.Blazor&version=0.0.1
#tool nuget:?package=NLightning.Infrastructure.Blazor&version=0.0.1
NLightning.Infrastructure
NLightning.Infrastructure is a core component of the NLightning ecosystem, providing essential infrastructure services for Lightning Network implementations in .NET. This library serves as a bridge between the application and domain layers and external dependencies.
Features
- Cross-platform cryptographic operations with support for:
- Native environments (AOT/Native) using BouncyCastle and Argon2
- Server/desktop environments using
libsodium
- Blazor WebAssembly using JavaScript interop and
libsodium.js
- Bitcoin and Lightning Network integration via NBitcoin
- DNS resolution capabilities
- Comprehensive logging support
Installation
Install the package from NuGet:
dotnet add package NLightning.Infrastructure
Configuration
NLightning.Infrastructure automatically adapts to your build environment:
- For AOT/Native builds, it uses BouncyCastle and Argon2
- For standard .NET applications, it uses libsodium
- For Blazor WebAssembly, it provides JavaScript interoperability
Blazor WebAssembly Setup
When using in a Blazor WebAssembly project, you need to initialize the crypto provider:
using NLightning.Infrastructure.Crypto.Providers.JS;
// Initialize before starting the app
await BlazorCryptoProvider.InitializeBlazorCryptoProviderAsync();
await builder.Build().RunAsync();
Usage
NLightning.Infrastructure is primarily used by other NLightning components, but you can also use it directly for:
// Crypto operations, networking, and other infrastructure services
// Detailed documentation coming soon
Dependencies
- NBitcoin and NBitcoin.Secp256k1 for Bitcoin operations
- Cryptographic libraries (BouncyCastle, Argon2, or libsodium depending on environment)
- DnsClient for DNS resolution
- Microsoft.Extensions.Logging for logging infrastructure
Related Projects
- NLightning.Application
- NLightning.Common
- NLightning.Domain
- NLightning.Bolt11
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- DnsClient (>= 1.8.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.JSInterop (>= 8.0.8)
- NBitcoin (>= 8.0.8)
- NBitcoin.Secp256k1 (>= 3.1.6)
- NLightning.Application (>= 0.0.1)
- NLightning.Common (>= 0.0.1)
- NLightning.Domain (>= 0.0.1)
-
net9.0
- DnsClient (>= 1.8.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.JSInterop (>= 8.0.8)
- NBitcoin (>= 8.0.8)
- NBitcoin.Secp256k1 (>= 3.1.6)
- NLightning.Application (>= 0.0.1)
- NLightning.Common (>= 0.0.1)
- NLightning.Domain (>= 0.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NLightning.Infrastructure.Blazor:
Package | Downloads |
---|---|
NLightning.Bolt11.Blazor
A Bitcoin Lightning Invoice Decoder/Encoder implemented in C# |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release of NLightning.Infrastructure library.