PierTwo.Lantern.Discv5.WireProtocol
1.0.0-preview.4
dotnet add package PierTwo.Lantern.Discv5.WireProtocol --version 1.0.0-preview.4
NuGet\Install-Package PierTwo.Lantern.Discv5.WireProtocol -Version 1.0.0-preview.4
<PackageReference Include="PierTwo.Lantern.Discv5.WireProtocol" Version="1.0.0-preview.4" />
paket add PierTwo.Lantern.Discv5.WireProtocol --version 1.0.0-preview.4
#r "nuget: PierTwo.Lantern.Discv5.WireProtocol, 1.0.0-preview.4"
// Install PierTwo.Lantern.Discv5.WireProtocol as a Cake Addin #addin nuget:?package=PierTwo.Lantern.Discv5.WireProtocol&version=1.0.0-preview.4&prerelease // Install PierTwo.Lantern.Discv5.WireProtocol as a Cake Tool #tool nuget:?package=PierTwo.Lantern.Discv5.WireProtocol&version=1.0.0-preview.4&prerelease
<center>Lantern.Discv5</center>
Lantern.Discv5, written in C#, is a library that provides an implementation of the Node Discovery V5 protocol.
This implementation provides relevant functionalities to allow peer-to-peer communication and facilitate node discovery in applications built on the .NET platform.
Features
The provided implementation has the following features available:
- Enables discovery of nodes that support the ENR (Ethereum Node Record) format
- Encrypted communication between peers using Secp256k1 and Diffie-Hellman key exchange protocol
- Provides functionality to enumerate the entire DHT in the network, leveraging lookup features for targeted nodes via independent path buckets
- Support for implementing custom handling of application-level request and response using
TALKREQ
andTALKRESP
messages
Installation
Note: These instructions assume you are familiar with the .NET Core development environment. If not, please refer to the official documentation to get started.
Install .NET Core SDK on your system if you haven't already.
Clone the repository:
git clone https://github.com/Pier-Two/Lantern.Discv5.git
Change to the
Lantern.Discv5
directory:cd Lantern.Discv5
Build the project:
dotnet build
Execute tests:
dotnet test
Quick Usage
This library can be used in any C# project using the following import statement:
using Lantern.Discv5.WireProtocol;
You can initialize the protocol by providing an array of bootstrap ENR (Ethereum Node Record) strings:
Discv5Protocol discv5 = Discv5Builder.CreateDefault(bootstrapEnrs);
Please refer to the Usage guide for more information and examples of the bootstrap ENRs as well as a comprehensive understanding of the available functionalities and configuration options.
Contributing
We welcome contributions to the Lantern.Discv5 project. To get involved, please read our Contributing Guidelines for the process for submitting pull requests to this repository.
License
This project is licensed under the MIT License.
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. |
-
net8.0
- BouncyCastle.Cryptography (>= 2.4.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- NBitcoin.Secp256k1 (>= 3.1.5)
- PierTwo.Lantern.Discv5.Enr (>= 1.0.0-preview.4)
- PierTwo.Lantern.Discv5.Rlp (>= 1.0.0-preview.4)
- System.Threading.Tasks.Dataflow (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on PierTwo.Lantern.Discv5.WireProtocol:
Repository | Stars |
---|---|
NethermindEth/nethermind
A robust execution client for Ethereum node operators.
|
Version | Downloads | Last updated |
---|---|---|
1.0.0-preview.4 | 33,045 | 6/26/2024 |
1.0.0-preview.3 | 9,950 | 6/25/2024 |