TrustBeat 0.3.0

dotnet add package TrustBeat --version 0.3.0
                    
NuGet\Install-Package TrustBeat -Version 0.3.0
                    
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="TrustBeat" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TrustBeat" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="TrustBeat" />
                    
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 TrustBeat --version 0.3.0
                    
#r "nuget: TrustBeat, 0.3.0"
                    
#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 TrustBeat@0.3.0
                    
#: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=TrustBeat&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=TrustBeat&version=0.3.0
                    
Install as a Cake Tool

TrustBeat C# / .NET SDK

Qualified electronic timestamps and Merkle anchoring — eIDAS-compliant, over a simple API.

Part of TrustBeat — digital trust infrastructure for the EU. All SDKs (Python, TypeScript, Java, C#, Go): trustbeat.eu/sdks.

Install

dotnet add package TrustBeat

Quickstart

using TrustBeat;

var tb = new TrustBeatClient("tb_live_...");

// Anchor a file (SHA-256 computed locally, file never leaves your machine).
// AnchorFileWaitAsync() blocks until the proof is ready (next batch, up to 11 min).
var proof = await tb.AnchorFileWaitAsync("contract.pdf");
Console.WriteLine(proof.Id);          // tracking ID
Console.WriteLine(proof.AnchoredAt);  // ISO 8601 timestamp
Console.WriteLine(proof.MerkleRoot);  // Merkle root of the batch

// Verify locally — no network call
bool valid = tb.Verify(proof);

// Or anchor a raw SHA-256 hash without blocking, then wait for the proof.
var job = await tb.AnchorAsync("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
var waited = await tb.AnchorWaitAsync(job.Id);  // polls up to 11 min

Tamper-Evident Logs (NIS2)

Anchor a log hash together with canonical metadata for NIS2 Article 21 audit trails. The server seals the metadata into the Merkle leaf, so the proof covers both the log content and its context.

using TrustBeat;

var tb = new TrustBeatClient("tb_live_...");

// Hash the log yourself — content never leaves your machine.
var logHash = await TrustBeatClient.HashFileAsync("app.log");

var meta = new LogMetadata(
    new LogSource("/var/log/app.log", "Application log"),
    new LogSourceIdentity(Hostname: "web-01", ServiceName: "payments"),
    new LogTimeEnvelope("2026-04-15T00:00:00Z", "2026-04-15T23:59:59Z"));

var job = await tb.AnchorLogAsync(logHash, meta, "incident-2026-05");
Console.WriteLine($"{job.Id} {job.CombinedHash}");

// Wait for the qualified anchor (next batch, up to ~11 min).
var proof = await tb.AnchorLogWaitAsync(job.Id);
Console.WriteLine(proof.VerificationStatus); // "VERIFIED"

Webhooks

If your account has a webhook secret configured, every delivery is signed with an X-TrustBeat-Signature header. Verify it with the raw request body — before any JSON parsing:

var ok = WebhookVerifier.VerifyWebhookSignature(rawBody, signatureHeader, webhookSecret);
if (!ok) throw new UnauthorizedAccessException("Invalid webhook signature");

Also available as TrustBeatClient.VerifyWebhookSignature(...). Rejects replays older than 5 minutes by default (toleranceSecs parameter to override).

Portable proof bundles for offline verification: ExportAiDecisionAsync(id), ExportVerificationAsync(id), ExportLogAsync(id) — each returns raw JSON bundle bytes.

Requirements

  • .NET 6+
  • Zero runtime dependencies (System.Net.Http, System.Security.Cryptography from stdlib)

Documentation

Full API reference and guides at api.trustbeat.eu/docs

License

MIT — see LICENSE

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

    • No dependencies.

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
0.3.0 91 7/19/2026
0.2.1 95 7/9/2026
0.2.0 108 7/5/2026
0.1.1 100 7/5/2026
0.1.0 107 7/1/2026