Nether.Models
6.1.1
dotnet add package Nether.Models --version 6.1.1
NuGet\Install-Package Nether.Models -Version 6.1.1
<PackageReference Include="Nether.Models" Version="6.1.1" />
<PackageVersion Include="Nether.Models" Version="6.1.1" />
<PackageReference Include="Nether.Models" />
paket add Nether.Models --version 6.1.1
#r "nuget: Nether.Models, 6.1.1"
#:package Nether.Models@6.1.1
#addin nuget:?package=Nether.Models&version=6.1.1
#tool nuget:?package=Nether.Models&version=6.1.1
Nethereums.Model
Core Ethereum data models for transactions, blocks, accounts, and cryptographic signatures in Nethereum.
Overview
Nethereum.Model is a foundational package that defines core Ethereum protocol data structures. It is used across the Nethereum ecosystem and covers:
- Transactions (Legacy, EIP-2930, EIP-1559, EIP-7702)
- Block headers
- Account state
- Cryptographic signatures (ECDSA)
- Smart contract event logs
All models support RLP encoding, the serialization format used by Ethereum.
Installation
dotnet add package Nethereum.Model
Dependencies
- Nethereum.RLP --- RLP serialization
- Nethereum.Util --- hashing, address utilities
Key Concepts
Transaction Types
Type Description
Legacy Pre-EIP-155 transactions Legacy + ChainId Replay protection EIP-2930 Access list support EIP-1559 Fee market transactions EIP-7702 Account abstraction
RLP Encoding
Used for: - Network transmission - Hash computation - State storage
Signatures (ECDSA)
- R --- curve point coordinate
- S --- signature proof
- V --- recovery ID + chainId
Chain ID
Used to: - Prevent replay attacks - Identify networks (Mainnet, Polygon, Arbitrum, etc.)
Quick Start
using Nethereum.Model;
using System.Numerics;
var tx = new Transaction1559(
chainId: 1,
nonce: 0,
maxPriorityFeePerGas: BigInteger.Parse("2000000000"),
maxFeePerGas: BigInteger.Parse("100000000000"),
gasLimit: 21000,
receiverAddress: "0x...",
amount: BigInteger.Parse("1000000000000000000"),
data: "",
accessList: null
);
Examples
Legacy Transaction
var tx = new LegacyTransaction(
to: "0x...",
amount: new BigInteger(10000000000000000),
nonce: 0,
gasPrice: new BigInteger(1000000000000),
gasLimit: 10000
);
Decode Transaction
var tx = new LegacyTransaction(rlpBytes);
var nonce = tx.Nonce;
Notes
- Always set correct chainId
- Use raw RLP for signing
- Use full RLP for broadcasting
- Post-merge: difficulty = 0, nonce unused
Related Packages
- Nethereum.Signer
- Nethereum.RPC
- Nethereum.Contracts
- Nethereum.Accounts
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net451 is compatible. net452 was computed. net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5.1
- Nether.RLP (>= 6.1.1)
- Nether.Util (>= 6.1.1)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
-
.NETFramework 4.6.1
- Nether.RLP (>= 6.1.1)
- Nether.Util (>= 6.1.1)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
-
.NETStandard 2.0
- Nether.RLP (>= 6.1.1)
- Nether.Util (>= 6.1.1)
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
-
net10.0
- Nether.RLP (>= 6.1.1)
- Nether.Util (>= 6.1.1)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
-
net6.0
- Nether.RLP (>= 6.1.1)
- Nether.Util (>= 6.1.1)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
-
net8.0
- Nether.RLP (>= 6.1.1)
- Nether.Util (>= 6.1.1)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
-
net9.0
- Nether.RLP (>= 6.1.1)
- Nether.Util (>= 6.1.1)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.1.1 | 297 | 5/4/2026 |