Uniform.Matrix.Client
0.1.0
See the version list below for details.
dotnet add package Uniform.Matrix.Client --version 0.1.0
NuGet\Install-Package Uniform.Matrix.Client -Version 0.1.0
<PackageReference Include="Uniform.Matrix.Client" Version="0.1.0" />
<PackageVersion Include="Uniform.Matrix.Client" Version="0.1.0" />
<PackageReference Include="Uniform.Matrix.Client" />
paket add Uniform.Matrix.Client --version 0.1.0
#r "nuget: Uniform.Matrix.Client, 0.1.0"
#:package Uniform.Matrix.Client@0.1.0
#addin nuget:?package=Uniform.Matrix.Client&version=0.1.0
#tool nuget:?package=Uniform.Matrix.Client&version=0.1.0
Uniform.Matrix.Client
A Matrix client engine for the .NET generic host: login and session storage, sync with local SQLite storage, room state, an outbox that keeps messages until the server has them, a media cache, and end-to-end encryption with cross-signing, key backup and verification. It has no user interface; the Durum terminal client is one built on it.
dotnet add package Uniform.Matrix.Client
Host it
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Uniform.Matrix.Client;
using Uniform.Matrix.Client.Services;
using Uniform.Matrix.Hosting;
HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
builder.AddSettings();
builder.AddMatrixClient();
builder.Services.AddSingleton<ICredentialPrompt, MyPasswordPrompt>();
using IHost host = builder.Build();
await host.StartAsync();
Give the user ID with --Matrix:UserId=@alice:matrix.org, and the address with --Matrix:Homeserver= when the server has no discovery file. The first start asks ICredentialPrompt for the password; later starts resume the stored session.
Use it
// Messages are stored, then sent in order, also after a restart
OutboxSender outbox = host.Services.GetRequiredService<OutboxSender>();
await outbox.EnqueueTextAsync(roomId, "Hello");
// Each processed sync, with the rooms it changed
SyncProcessor sync = host.Services.GetRequiredService<SyncProcessor>();
await foreach (SyncChanges changes in sync.Changes.ReadAllAsync())
{
foreach (Room room in changes.Joined) Console.WriteLine(room.DisplayName);
}
RoomStore and Room hold the state built from sync: display names computed as the spec says, members, timeline and unread counts. Read them under the processor's lock with sync.Read(store => …). CryptoService exposes the encryption status, recovery and verification.
Each account has its own folder with client.db and media/ under the data directory, and each session writes its own log file.
About
Part of Uniform.Matrix, a pure .NET implementation of the Matrix specification. Version 0.1 is an early pre-release: APIs may still change.
| 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. |
-
net10.0
- AngleSharp (>= 1.8.3)
- Markdig (>= 1.3.2)
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.12)
- Microsoft.Extensions.Http (>= 10.0.12)
- Uniform.Matrix.Hosting (>= 0.1.0)
- Uniform.Matrix.Protocol.Client (>= 0.1.0)
- Uniform.Matrix.Protocol.Crypto (>= 0.1.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.2 | 0 | 10/27/2026 |
| 0.1.0 | 31 | 10/26/2026 |
| 0.1.0-alpha.1 | 29 | 10/26/2026 |