Uniform.Matrix.Protocol.Server 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Uniform.Matrix.Protocol.Server --version 0.1.0
                    
NuGet\Install-Package Uniform.Matrix.Protocol.Server -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.Protocol.Server" 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.Protocol.Server" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Uniform.Matrix.Protocol.Server" />
                    
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.Protocol.Server --version 0.1.0
                    
#r "nuget: Uniform.Matrix.Protocol.Server, 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.Protocol.Server@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.Protocol.Server&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Uniform.Matrix.Protocol.Server&version=0.1.0
                    
Install as a Cake Tool

Uniform.Matrix.Protocol.Server

Protocol building blocks of a Matrix homeserver, without storage: room versions 10 and 11, the event (PDU) format, content hashes, reference-hash event IDs, signing, redaction and the authorization rules.

dotnet add package Uniform.Matrix.Protocol.Server

Events

using System.Text.Json.Nodes;
using Uniform.Matrix.Protocol.Server;

RoomVersion version = RoomVersion.V11;

// Hash and sign with the server's Ed25519 key, then derive the event ID
EventFormat.HashAndSign(pdu, version, "example.org", "ed25519:a_key", signingSeed);
string eventId = EventFormat.ComputeEventId(pdu, version);

// Check a received event
bool intact = EventFormat.HasValidContentHash(pdu);
bool signed = EventFormat.HasValidSignature(pdu, version, "example.org", "ed25519:a_key", publicKey);

// Redact as the room version prescribes
JsonObject redacted = EventFormat.Redact(pdu, version);

Authorization

AuthEvents.Select names the state an event is authorized against, and AuthRules.Check applies the rules of the room version: it returns null when the event is allowed, or the reason it is not.

string? rejection = AuthRules.Check(pdu, version, authState);

PowerLevels reads m.room.power_levels with the defaults of the spec.

The homeserver that uses these is Uniform.Matrix.Server.

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 (1)

Showing the top 1 NuGet packages that depend on Uniform.Matrix.Protocol.Server:

Package Downloads
Uniform.Matrix.Server

Matrix homeserver engine on ASP.NET Core and SQLite: accounts, rooms, sync, media, the end-to-end encryption relay and the room directory. Add it with AddMatrixServer and MapMatrixServer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.6 36 10/28/2026
0.1.5-rc1 42 10/27/2026
0.1.2 46 10/27/2026
0.1.0 62 10/26/2026
0.1.0-alpha.1 50 10/26/2026