Releases: nGoline/NLightning
Release NLightning.Domain v1.1.0
What's Changed
- Fix behavior when connection drops by @nGoline in #56
- Allow for extensible
BitcoinNetworkby @nGoline in #57
Full Changelog: bolt11-v4.0.0...domain-v1.1.0
Release NLightning.Infrastructure.Bitcoin v0.0.1
What's Changed
Initial release for NLightning.Infrastructure.Bitcoin
NLightning.Infrastructure.Bitcoin is a dedicated component within the NLightning ecosystem, providing essential
Bitcoin-specific infrastructure services for Lightning Network implementations in . NET. This library focuses on
integrating Bitcoin functionalities, leveraging the NBitcoin library.
Related PRs
Release NLightning.Infrastructure v1.0.0
What's Changed
This version captures the major refactoring effort where Bitcoin-specific functionalities were moved to a dedicated NLightning.Infrastructure.Bitcoin package, and the core infrastructure was updated with new services and breaking changes to improve modularity and robustness.
🚀 Added
- Implemented
TcpServiceand its interfaceITcpServicefor handling TCP connections. - Introduced
TransportServiceto manage the underlying transport layer. - Added
PeerDisconnectedEventArgsfor domain-level peer disconnection events. - Added
NewPeerConnectedEventArgsfor transport-layer new peer connection events. - Introduced
Roleenum (Initiator,Responder) to provide clarity in the handshake process. - Added implicit operators to
SecureMemoryfor easierSpan<byte>andReadOnlySpan<byte>conversion. - Added targets for bundling
LibsodiumJsand its dependencies intoblazorSodium.bundle.jsforNLightning.Infrastructure.Blazor.
🔧 Modified
- Split the original
Peerresponsibilities intoPeerServiceandPeerCommunicationServiceto better separate peer lifecycle management from communication. - Signatures for cryptographic methods in
NativeCryptoProvider, includingAeadChaCha20Poly1305IetfEncryptandAeadChaCha20Poly1305IetfDecrypt, were updated for clarity and consistency. - Methods
InsertSecretandDeriveOldSecretinSecretStorageServicenow use the domain-specificSecrettype for improved type safety. - Constructors and methods within handshake components were adjusted to align with protocol updates.
⚠️ Breaking Changes
- Removed direct dependencies on
NBitcoinandNBitcoin.Secp256k1. Projects consumingNLightning.Infrastructurethat relied on these packages transitively must now referenceNLightning.Infrastructure.Bitcoinor add direct references themselves. - Moved core components to
NLightning.Infrastructure.Bitcoin:- Cryptographic classes:
NLightningContext,Ecdh,Ripemd160, andKeyPair. - Utility class
Bech32Encoder. - Service
KeyDerivationService.
- Cryptographic classes:
- The legacy peer management system (including
Peer,IPeer,PeerFactory,PeerManager) has been removed and superseded by the newPeerServicearchitecture. - As detailed in the "Modified" section, changes to method signatures in
NativeCryptoProviderandSecretStorageServiceare breaking. - The modification to the
PubKeyproperty inPeerAddressto use a domain-specific type constitutes a breaking change. - Removed
PingPongServiceFactory.csand theCommitmentNumber.csdata model.
Related PRs
Full Changelog: infrastructure-v0.0.2...infrastructure-v1.0.0
Release NLightning.Domain v1.0.0
What's Changed
This release marks a major refactoring of the NLightning.Domain layer. The focus has been on establishing a robust and abstract core by refining channel management, standardizing protocol messages, and decoupling the domain from external libraries.
The primary goal of these changes is to create a solid foundation for building advanced Lightning Network features with clear separation of concerns.
🚀 Added
- Internal Domain Primitives: Introduced new value objects for Bitcoin concepts (e.g.,
TxId,BitcoinScript,CompactPubKey,Secret) to abstract away dependencies on external libraries like NBitcoin. - Rich Channel Models: Added comprehensive models for core channel components, including
ChannelModel,ChannelKeySetModel, and detailed configuration objects likeChannelConfigandChannelBasepoints. - Standardized Factories and Services: Introduced new factories (
ChannelFactory,CommitmentTransactionModelFactory) and service interfaces (ILightningSigner,ICommitmentKeyDerivationService) to support the new domain models. - Protocol Message Handling: Added new factories and interfaces for creating and serializing protocol messages, promoting consistency.
- The
BitReaderandBitWriterutilities were moved fromNLightning.Commonto become part of the core domain logic.
🔧 Modified
- Protocol Message Restructuring: Core messages like
OpenChannel1Messageand their payloads were updated with dedicated properties and modern TLV field support. - Domain Primitive Enhancements: Made significant updates to
LightningMoneyfor arithmetic operations and improved feature handling inFeatureSet. - Widespread Reorganization: To improve structure, many types and interfaces were moved to more specific namespaces (e.g.,
NLightning.Domain/Channels,NLightning.Domain/Bitcoin,NLightning.Domain/Protocol). Service interfaces were moved to dedicatedInterfacessub-namespaces.
⚠️ Breaking Changes
- Removed NBitcoin Dependency: The direct package reference to
NBitcoinhas been removed. Consumers relying on NBitcoin types must now add a direct reference or adapt to the new abstractions provided inNLightning.Domain.Bitcoin.*. - Core Type Relocations:
Channelhas been renamed toChannelModel.Networkis nowBitcoinNetwork.ChannelId,ChannelState,ShortChannelId, and many other types have been moved to more specific sub-namespaces. This will require updates tousingstatements.
- Interface Removals and Moves:
- Interfaces like
ICommitmentTransactionFactoryandIFundingTransactionFactoryhave been removed. - Key interfaces like
IMessageFactoryandISecureKeyManagerhave been moved to theNLightning.Domain.Protocol.Interfacesnamespace.
- Interfaces like
- The extensive refactoring and addition of new types have resulted in breaking changes to method signatures, constructors, and properties across the domain layer.
Related PRs
Full Changelog: domain-v0.0.1...domain-v1.0.0
Release NLightning.Bolt11 v4.0.0
What's Changed
This release enhances invoice robustness by introducing a dedicated validation service and stricter field checks. It also improves API consistency and strengthens null-safety across the library.
🚀 Added
- A new
InvoiceValidationServicehas been introduced for more robust validation during the invoice decoding process. - Error handling is now more descriptive, with detailed
ArgumentExceptionmessages for missing or invalid fields. - Enhanced null-safety with
[DisallowNull]attributes applied to key properties likePaymentHash,PaymentSecret, andPayeePubKey. - Improved nullability annotations for the
TaggedFieldList.TryGet<T>method using[MaybeNullWhen(false)].
🔧 Modified
- The
TaggedFieldList.Addmethod now validates fields before they are added. - Validation for several tagged fields has been made stricter:
DescriptionTaggedFieldnow correctly validates the description's length in bytes.DescriptionHashTaggedField,PaymentHashTaggedField, andPaymentSecretTaggedFieldnow treat all-zero or all-one hash values as invalid.
⚠️ Breaking Changes
- The
Invoiceconstructors were changed to accept aBitcoinNetworkobject instead ofNetworkto align better with the NLightning domain.
New Contributors
- @moisesPompilio made their first contribution in #50
Related PRs
Full Changelog: bolt11-v3.0.1...bolt11-v4.0.0