Netezos 3.0.0
Prefix Reserveddotnet add package Netezos --version 3.0.0
NuGet\Install-Package Netezos -Version 3.0.0
<PackageReference Include="Netezos" Version="3.0.0" />
<PackageVersion Include="Netezos" Version="3.0.0" />
<PackageReference Include="Netezos" />
paket add Netezos --version 3.0.0
#r "nuget: Netezos, 3.0.0"
#:package Netezos@3.0.0
#addin nuget:?package=Netezos&version=3.0.0
#tool nuget:?package=Netezos&version=3.0.0
Netezos
<a href="https://www.nuget.org/packages/Netezos/"><img src="https://img.shields.io/nuget/v/Netezos.svg" /></a>
<a href="https://www.nuget.org/packages/Netezos/"><img src="https://img.shields.io/nuget/dt/Netezos.svg" /></a>
Netezos is a cross-platform Tezos SDK for .NET developers, simplifying the access and interaction with the Tezos blockchain.
The following functionality is available:
Namespace | Description |
---|---|
Netezos.Contracts | Tools for interaction with Tezos smart contracts, enabling building/parsing Micheline types from/to human-readable types. |
Netezos.Encoding | Encoding tools for working with Tezos Micheline, Base58, Hex, etc.. |
Netezos.Forge | Forging tools for encoding operations into binary format accepting by Tezos nodes. |
Netezos.Keys | Tools for working with simple and HD keys. Supported curves: ed25519 (tz1), secp256k1 (tz2), nistp256 (tz3), bls12381 (tz4). |
Netezos.Ledger | Tools for interaction with Tezos Ledger App. This is sort of a legacy package, that is no longer maintained, but still working. |
Netezos.Rpc | Tezos RPC wrapper |
For full documentation and API Reference, please refer to the Netezos website
Contribution
Netezos is an open development project so any contribution is highly appreciated, starting from documentation improvements, writing examples of usage, etc. and ending with adding new features (as long as these features do not break existing API or are only intended for one person and for very specific use case).
Do not hesitate to use GitHub issue tracker to report bugs or request features.
Support
Feel free to join our Discord server or Telegram chat. We will be glad to hear any feedback and feature requests and will try to help you with general use cases of the Netezos library.
Getting started
Let's consider the most common use case - sending a transaction.
Installation
PM> Install-Package Netezos
Create private key
// generate new key
var key = new Key();
// or use existing one
var key = Key.FromBase58("edsk4ZkGeBwDyFVjZLL2neV5FUeWNN4NJntFNWmWyEBNbRwa2u3jh1");
// use the address to receive some tez from faucet
var address = key.PubKey.Address; // tz1SauKgPRsTSuQRWzJA262QR8cKdw1d9pyK
Get some data from RPC
using var rpc = new TezosRpc("https://rpc.tzkt.io/mainnet/");
// get a head block
var head = await rpc.Blocks.Head.Hash.GetAsync<string>();
// get account's counter
var counter = await rpc.Blocks.Head.Context.Contracts[address].Counter.GetAsync<int>();
Forge an operation
Since our address has just been created, we need to reveal its public key before sending any operation, so that everyone can validate our signatures. Therefore, we need to send actually two operations: a reveal and then a transaction.
Netezos allows you to pack multiple operations into a group and forge/send it as an atomic batch.
var content = new ManagerOperationContent[]
{
new RevealContent
{
Source = address,
Counter = ++counter,
PublicKey = key.PubKey.GetBase58(),
GasLimit = 3500,
Fee = 1000 // 0.001 tez
},
new TransactionContent
{
Source = address,
Counter = ++counter,
Amount = 1000000, // 1 tez
Destination = "tz1KhnTgwoRRALBX6vRHRnydDGSBFsWtcJxc",
GasLimit = 2500,
Fee = 1000 // 0.001 tez
}
};
var bytes = await new LocalForge().ForgeOperationGroupAsync(head, content);
Sign and send
// sign the operation bytes
byte[] signature = key.SignOperation(bytes);
// inject the operation and get its id (operation hash)
var result = await rpc.Inject.Operation.PostAsync(bytes.Concat(signature));
That is it. We have successfully injected our first operation into the Tezos blockchain.
Useful links
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
- Dynamic.Json (>= 1.4.2)
- Portable.BouncyCastle (>= 1.9.0)
-
net9.0
- Dynamic.Json (>= 1.4.2)
- Portable.BouncyCastle (>= 1.9.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Netezos:
Package | Downloads |
---|---|
Swisschain.Sirius.Sdk.Crypto
Package Description |
|
Beacon.Sdk
Beacon .NET SDK for Tezos wallet / dApps developers. |
|
Nichelson
Package Description |
|
TzWatch.Lib
Package Description |
|
TezosPayments
Package for payment generation in the Tezos Payments system |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Netezos:
Repository | Stars |
---|---|
baking-bad/tzkt
😼 Awesome Tezos blockchain indexer and API
|
Version | Downloads | Last Updated |
---|---|---|
3.0.0 | 267 | 8/4/2025 |
2.12.1 | 626 | 6/13/2025 |
2.12.0 | 337 | 4/29/2025 |
2.11.0 | 817 | 1/18/2025 |
2.10.1 | 7,492 | 5/23/2024 |
2.10.0 | 131 | 5/23/2024 |
2.9.0 | 7,190 | 2/5/2024 |
2.8.0 | 3,054 | 3/29/2023 |
2.7.7 | 1,381 | 2/8/2023 |
2.7.6 | 870 | 2/7/2023 |
2.7.5 | 1,279 | 1/24/2023 |
2.7.4 | 968 | 1/22/2023 |
2.7.3 | 1,270 | 12/25/2022 |
2.7.2 | 1,133 | 12/9/2022 |
2.7.1 | 1,053 | 11/29/2022 |
2.7.0 | 1,066 | 11/24/2022 |
2.6.2 | 2,119 | 8/18/2022 |
2.6.1 | 1,246 | 8/3/2022 |
2.6.0 | 1,479 | 6/29/2022 |
2.6.0-rc.1 | 386 | 5/23/2022 |
2.5.2 | 3,216 | 3/31/2022 |
2.5.1 | 1,930 | 3/12/2022 |
2.5.0 | 1,085 | 3/12/2022 |
2.4.7 | 1,641 | 12/22/2021 |
2.4.6 | 9,907 | 11/25/2021 |
2.4.5 | 4,118 | 11/25/2021 |
2.4.4 | 1,220 | 11/4/2021 |
2.4.3 | 16,460 | 10/28/2021 |
2.4.2 | 983 | 10/28/2021 |
2.4.1 | 1,423 | 10/20/2021 |
2.4.0 | 1,069 | 10/20/2021 |
2.4.0-rc.1 | 440 | 9/29/2021 |
2.3.14 | 1,351 | 9/2/2021 |
2.3.13 | 4,133 | 6/15/2021 |
2.3.12 | 1,147 | 6/2/2021 |
2.3.11 | 1,158 | 5/25/2021 |
2.3.10 | 1,191 | 5/23/2021 |
2.3.9 | 2,542 | 4/9/2021 |
2.3.8 | 1,974 | 4/7/2021 |
2.3.7 | 1,035 | 4/2/2021 |
2.3.6 | 1,023 | 4/1/2021 |
2.3.5 | 1,153 | 3/29/2021 |
2.3.4 | 1,042 | 3/28/2021 |
2.3.3 | 1,079 | 3/26/2021 |
2.3.2 | 1,516 | 3/19/2021 |
2.3.1 | 1,116 | 3/17/2021 |
2.3.0 | 1,039 | 3/16/2021 |
2.2.1 | 1,712 | 2/20/2021 |
2.2.0 | 1,236 | 2/11/2021 |
2.1.5 | 1,054 | 2/9/2021 |
2.1.4 | 1,118 | 1/28/2021 |
2.1.3 | 1,133 | 1/25/2021 |
2.1.2 | 1,087 | 1/24/2021 |
2.1.1 | 1,160 | 1/22/2021 |
2.1.0 | 1,156 | 1/21/2021 |
2.0.1 | 1,154 | 12/9/2020 |
2.0.0 | 1,228 | 12/6/2020 |
2.0.0-rc.1 | 626 | 10/22/2020 |