Hiero 0.1.0-alpha04

This is a prerelease version of Hiero.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Hiero --version 0.1.0-alpha04
                    
NuGet\Install-Package Hiero -Version 0.1.0-alpha04
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hiero" Version="0.1.0-alpha04" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hiero" Version="0.1.0-alpha04" />
                    
Directory.Packages.props
<PackageReference Include="Hiero" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hiero --version 0.1.0-alpha04
                    
#r "nuget: Hiero, 0.1.0-alpha04"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hiero@0.1.0-alpha04
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hiero&version=0.1.0-alpha04&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Hiero&version=0.1.0-alpha04&prerelease
                    
Install as a Cake Tool

Hiero

.NET Client Library for the Hiero Network and Hedera Hashgraph

NuGet License

Hiero provides idiomatic .NET access to the full Hedera public network — cryptocurrency, consensus messaging, tokens, NFTs, smart contracts, file storage, scheduled transactions, airdrops, and more.

Alpha Software — This library is under active development. The API surface is subject to change in later versions without notice. Use at your own risk.

Quick Start

Install

dotnet add package Hiero

Requirements: .NET 10 SDK

Hello World — Query an Account Balance

await using var client = new ConsensusClient(ctx =>
{
    ctx.Endpoint = new ConsensusNodeEndpoint(
        new EntityId(0, 0, 3),
        new Uri("https://2.testnet.hedera.com:50211"));
});

var balance = await client.GetAccountBalanceAsync(new EntityId(0, 0, 98));
Console.WriteLine($"Balance: {balance:#,#} tinybars");

Transfer Crypto

await using var client = new ConsensusClient(ctx =>
{
    ctx.Endpoint = new ConsensusNodeEndpoint(
        new EntityId(0, 0, 3),
        new Uri("https://2.testnet.hedera.com:50211"));
    ctx.Payer = new EntityId(0, 0, payerAccountId);
    ctx.Signatory = new Signatory(payerPrivateKey);
});

var receipt = await client.TransferAsync(
    new EntityId(0, 0, senderAccountId),
    new EntityId(0, 0, receiverAccountId),
    amount);

Create a Token

var receipt = await client.CreateTokenAsync(new CreateTokenParams
{
    Name = "My Token",
    Symbol = "MTK",
    Decimals = 8,
    InitialSupply = 1_000_000,
    Treasury = treasuryAccount,
    Administrator = new Endorsement(adminPublicKey),
    Signatory = new Signatory(adminPrivateKey)
});
Console.WriteLine($"Token ID: {receipt.Token}");

Architecture

Hiero provides three client types, each targeting a different part of the Hedera network:

Client Purpose Protocol
ConsensusClient Submit transactions and queries to gossip nodes gRPC
MirrorRestClient Query historical data and state from Mirror Nodes REST/JSON
MirrorGrpcClient Subscribe to real-time streams (e.g., HCS topics) gRPC streaming

Transaction Pattern

All state-changing operations follow the same pattern:

Create *Params → Configure Client → ExecuteAsync → Receive *Receipt

Every transaction type has a dedicated *Params class, a typed *Receipt, and an optional detailed *Record available from the Mirror Node.

Context Stack

Client configuration uses a hierarchical context stack. Child contexts (created via Clone or per-call configure callbacks) inherit from the parent but can override individual settings without affecting it:

var child = client.Clone(ctx => ctx.FeeLimit = 500_000_000);
// child inherits parent's Endpoint, Payer, Signatory — but has its own FeeLimit

Supported Network Services

  • Cryptocurrency — Create, transfer, update, and delete accounts; multi-party transfers; allowances
  • Consensus Service (HCS) — Create topics, submit messages (including segmented large messages), subscribe to streams
  • Tokens — Fungible token lifecycle: create, mint, burn, transfer, freeze, pause, KYC, royalties
  • NFTs — Non-fungible token lifecycle: create, mint, burn, transfer, confiscate, update metadata
  • Smart Contracts — Deploy, call, query contracts; native EVM transaction support (type 0/1/2)
  • File Service — Create, append, update, and delete files on the network
  • Scheduled Transactions — Wrap any transaction for deferred execution with multi-sig collection
  • Airdrops — Distribute tokens to multiple recipients; pending airdrop claim/cancel workflow
  • Network Utilities — Address book, fee schedules, exchange rates, version info, pseudo-random numbers

Key Types

Type Description
EntityId Hedera entity address (shard.realm.num), also supports key aliases and EVM addresses
Endorsement Public key or N-of-M key list representing signing requirements
Signatory Private key, key list, or async callback for signing transactions
ConsensusNodeEndpoint Network node identity (account + gRPC URI)
ConsensusTimeStamp Nanosecond-precision Hedera timestamp

Building from Source

dotnet restore Hiero.slnx
dotnet build Hiero.slnx

Build Documentation

dotnet tool restore
dotnet docfx docfx/docfx.json --serve

Project Structure

Hiero/                     Source library
├── Consensus/             HCS topic operations
├── Contract/              Smart contract operations
├── Crypto/                Account and transfer operations
├── Token/                 Fungible token operations
├── Nft/                   Non-fungible token operations
├── File/                  File service operations
├── Schedule/              Scheduled transaction operations
├── AddressBook/           Consensus node management
├── Root/                  System/network admin operations
├── Mirror/                Mirror Node REST query types
├── Utilities/             Network queries and helpers
├── Converters/            JSON serialization
└── Implementation/        Internal machinery
Reference/                 Upstream protobuf definitions (do not modify)
docfx/                     DocFX documentation site

Dependencies

Documentation

License

This project is licensed under the GPL-3.0-or-later.

Copyright 2025 BugBytes, Inc. All Rights Reserved.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.