Axowl.Sdk.Eventing.Client
0.1.1
dotnet add package Axowl.Sdk.Eventing.Client --version 0.1.1
NuGet\Install-Package Axowl.Sdk.Eventing.Client -Version 0.1.1
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="Axowl.Sdk.Eventing.Client" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Axowl.Sdk.Eventing.Client" Version="0.1.1" />
<PackageReference Include="Axowl.Sdk.Eventing.Client" />
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 Axowl.Sdk.Eventing.Client --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Axowl.Sdk.Eventing.Client, 0.1.1"
#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 Axowl.Sdk.Eventing.Client@0.1.1
#: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=Axowl.Sdk.Eventing.Client&version=0.1.1
#tool nuget:?package=Axowl.Sdk.Eventing.Client&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Axowl.Sdk.Eventing.Client
Bi-directional event SDK for Axowl audit chain:
- Publish customer-defined events (
custom.wallet.topupetc) — Axowl seals + archives them in the same chain as managed events (user.login, korean_identity.verified, etc). - Poll events back — cursor-based, unary RPC (CF Free friendly, no streaming).
Install
dotnet add package Axowl.Sdk.Eventing.Client
Publish (customer → Axowl)
using Axowl.Sdk.Eventing.Abstractions.Contracts;
using Axowl.Sdk.Eventing.Client;
using System.Text.Json;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAxowlEventing(opts =>
{
opts.ApiKey = builder.Configuration["Axowl:ApiKey"]!;
opts.Transport = TransportMode.GrpcWithFallback;
});
var app = builder.Build();
app.MapPost("/wallet/topup", async (IAxowlEventClient axowl, TopUpRequest req) =>
{
// 1) business logic (DB write, etc)
// ...
// 2) seal event in Axowl chain
var sealed = await axowl.PublishAsync(
eventType: "custom.wallet.topup",
businessDataJson: JsonSerializer.Serialize(new { req.UserId, req.Amount }),
triggeredBy: req.UserId.ToString(),
targetUserId: req.UserId.ToString());
return Results.Ok(new {
log_id = sealed.LogId,
integrity_hash = sealed.IntegrityHash,
signature = sealed.Signature,
sealed_at = sealed.SealedAt
});
});
EventType MUST start with custom. — managed namespace (user.*, korean_identity.*, etc.) reserved for Axowl internal handlers.
Poll (Axowl → customer fan-out)
Register handler classes; SDK runs a BackgroundService that calls them.
public class WalletTopUpHandler : IAxowlEventHandler
{
public IReadOnlyList<string> EventTypePatterns => new[] { "custom.wallet.*" };
public async Task HandleAsync(AxowlEvent evt, CancellationToken ct)
{
// react: send email, update cache, etc.
// idempotent — same LogId may arrive twice in edge cases (network retry).
}
}
// Program.cs
services.AddSingleton<IAxowlEventHandler, WalletTopUpHandler>();
services.AddAxowlEventing(opts =>
{
opts.ApiKey = "ah_live_...";
opts.EventTypes = new[] { "custom.*" }; // poll filter
opts.PollInterval = TimeSpan.FromSeconds(5);
}, enablePollingService: true);
Programmatic Poll (no fan-out)
var batch = await axowl.PollAsync(
cursor: savedCursor,
eventTypes: new[] { "custom.voucher.*" },
categories: new[] { "CUSTOM" },
limit: 100);
foreach (var evt in batch.Events) { /* handle */ }
SaveCursor(batch.NextCursor);
Architecture
| Path | Origin | Pipeline |
|---|---|---|
Managed events (user.login etc) |
Axowl internal | MediatR → NATS bridge → AuthDelegationWorker → seal + R2 + DB |
Custom events (custom.wallet.topup) |
SDK consumer | Publish gRPC → server inline seal + DB write |
| Poll | Both | AuditEventLogs (3-day DB cache). v1 = R2 backfill |
EventCategory column distinguishes (CUSTOM vs USER/AUTH/...). Filter via Poll parameters.
Wildcard match (handler + filter)
| Pattern | Matches |
|---|---|
"custom.wallet.topup" |
exact |
"custom.wallet.*" |
custom.wallet.topup, custom.wallet.withdraw |
"*" |
anything |
Configuration reference
public sealed class AxowlEventingClientOptions
{
public string ServerAddress { get; set; } = "https://testgrpc.axowl.com";
public string RestServerAddress { get; set; } = "https://testapi.axowl.com";
public string ApiKey { get; set; } = "";
public TransportMode Transport { get; set; } = TransportMode.Grpc;
public TimeSpan PollInterval { get; set; } = TimeSpan.FromSeconds(5);
public int Limit { get; set; } = 100;
public IReadOnlyList<string> EventTypes { get; set; } = Array.Empty<string>();
public IReadOnlyList<string> Categories { get; set; } = Array.Empty<string>();
public DateTime? SinceUtc { get; set; }
}
Related
Axowl.Sdk.Integrity.Client— hash chain primitivesAxowl.Sdk.Identity.Client— JWT + permission check
| Product | Versions 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.
-
net10.0
- Axowl.Sdk.Eventing.Abstractions (>= 0.1.0)
- Google.Api.CommonProtos (>= 2.16.0)
- Google.Protobuf (>= 3.28.2)
- Grpc.Net.Client (>= 2.66.0)
- Grpc.Net.ClientFactory (>= 2.66.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.1.1 | 52 | 9/26/2026 |