The main API is in DotNetLightning.Core
project/assembly.
The package is compiled and published with two variants:
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
- This uses a pre-compiled
libsodium
for cryptographic operations. - It only supports
windows
,mac
andlinux
environments. - This is what you want if you need performance and the environments above are the only ones you are planning to support.
- This uses a pre-compiled
Run dotnet add package
with the one you want.
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.
Contains a low-level primitives for LN. Mostly it is for internal usage but some are useful for consumer's point of view. (e.g. LNMoney to represent milli-satoshis value)
Contains items for wire-protocol. FeatureBits, TLV, and P2P messages.
Contains modules and types for working with Cryptographic operations. For example LN-onion network encoding, aezeed for seed backups.
Interface to inject I/O (e.g. signing keys and Blockchain-interaction).
This is a module for creating LN-specific transactions. Mostly for internal usage.
Handles handshake and encryption against other peers.
Handles channel state. This module is pretty much WIP (not sure when it will be finished, as this is the most complex part in the LN protocol).
Contains primitives for Payment-related operations. The most important class is PaymentRequest
,
a.k.a. bolt11-invoice, LN-invoice.
It also contains primitives for LSAT, the LN based http authentication mechanism. See here for PoC of AspNetCore middleware for LSAT.
Module for calculating payment routes. (Very WIP.)
Some sibling assemblies come together when you install DotNetLightning
or DotNetLightning.Core
. These are mostly for internal usages but some might be useful for you:
Which contains managed code for aez cipher scheme.
It may be useful if you want to secure your data before saving it to disk. See official page for more details: https://www.cs.ucdavis.edu/~rogaway/aez/index.html
Which contains macaroon authentication token.
The API is mostly the same as libmacaroon (see libmacaroon's readme for the usage).
(Currently it is only supported in BouncyCastle build (which means not in DotNetLightning.Core
),
see joemphilips#153 for more info.)