Uniform.Matrix.Client 0.1.0

There is a newer version of this package available.
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
                    
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="Uniform.Matrix.Client" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Uniform.Matrix.Client" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Uniform.Matrix.Client" />
                    
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 Uniform.Matrix.Client --version 0.1.0
                    
#r "nuget: Uniform.Matrix.Client, 0.1.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 Uniform.Matrix.Client@0.1.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=Uniform.Matrix.Client&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Uniform.Matrix.Client&version=0.1.0
                    
Install as a Cake Tool

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 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.

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