AriaBsv.Core
0.5.1
dotnet add package AriaBsv.Core --version 0.5.1
NuGet\Install-Package AriaBsv.Core -Version 0.5.1
<PackageReference Include="AriaBsv.Core" Version="0.5.1" />
<PackageVersion Include="AriaBsv.Core" Version="0.5.1" />
<PackageReference Include="AriaBsv.Core" />
paket add AriaBsv.Core --version 0.5.1
#r "nuget: AriaBsv.Core, 0.5.1"
#:package AriaBsv.Core@0.5.1
#addin nuget:?package=AriaBsv.Core&version=0.5.1
#tool nuget:?package=AriaBsv.Core&version=0.5.1
aria-bsv — .NET SDK
C# / .NET 8 SDK for ARIA (Auditable Real-time Inference Architecture) — cryptographic accountability for AI systems, anchored on BSV blockchain via BRC-121.
Install
dotnet add package AriaBsv.Core
Quick start
using AriaBsv.Core;
var config = new AuditorConfig
{
SystemId = "my-ai-system",
ModelHashes = new Dictionary<string, string>
{
["gpt-4o"] = "sha256:abc123..."
}
};
var auditor = new InferenceAuditor(config);
await auditor.OpenEpochAsync();
await auditor.RecordAsync(new AuditRecord
{
ModelId = "gpt-4o",
Input = "What is 2+2?",
Output = "4",
Confidence = 0.99
});
var summary = await auditor.CloseEpochAsync();
Console.WriteLine($"Epoch: {summary.EpochId}");
Console.WriteLine($"Merkle root: {summary.MerkleRoot}");
Classes
Hasher
Deterministic canonical JSON hashing (SHA-256), compatible with BRC-121.
using AriaBsv.Core;
// Hash any object (keys sorted, canonical JSON)
string hash = Hasher.HashObject(new { model = "gpt-4o", input = "hello" });
Console.WriteLine(hash); // sha256:abc123...
// Hash raw bytes
string raw = Hasher.HashBytes(Encoding.UTF8.GetBytes("hello world"));
// Get canonical JSON string
string json = Hasher.CanonicalJson(new { b = 2, a = 1 });
// {"a":1,"b":2}
MerkleTree
BRC-121 Merkle tree with second-preimage attack protection (leaf prefix 0x00, internal node prefix 0x01).
using AriaBsv.Core;
var tree = new MerkleTree();
tree.AddLeaf("record-hash-1");
tree.AddLeaf("record-hash-2");
tree.AddLeaf("record-hash-3");
string root = tree.Root();
bool valid = MerkleTree.Verify("record-hash-1", tree.Proof(0), root);
InferenceAuditor
High-level auditor that manages epoch lifecycle and Merkle accumulation.
using AriaBsv.Core;
var auditor = new InferenceAuditor(new AuditorConfig
{
SystemId = "production",
ModelHashes = new() { ["llama3"] = "sha256:..." }
});
await auditor.OpenEpochAsync();
await auditor.RecordAsync(new AuditRecord
{
ModelId = "llama3",
Input = "Summarize this document.",
Output = "This document covers...",
Confidence = 0.95
});
var summary = await auditor.CloseEpochAsync();
AuditRecord
var record = new AuditRecord
{
RecordId = Guid.NewGuid().ToString(), // auto-generated if omitted
ModelId = "gpt-4o",
Input = "user prompt",
Output = "model response",
Confidence = 0.98,
Timestamp = DateTimeOffset.UtcNow
};
Running tests
dotnet test
Requirements
- .NET 8+
System.Text.Json(included)
Compatibility
Hash and Merkle outputs are fully interoperable with the Python, Go, TypeScript, and Rust ARIA SDKs.
License
MIT — Juan Manuel Palencia Osorio
| 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 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. |
-
net8.0
- System.Text.Json (>= 8.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 |
|---|---|---|
| 0.5.1 | 120 | 3/30/2026 |