Uniform.Matrix.Protocol.Server 0.1.23

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.23
                    
NuGet\Install-Package Uniform.Matrix.Protocol.Server -Version 0.1.23
                    
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.23" />
                    
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.23" />
                    
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.23
                    
#r "nuget: Uniform.Matrix.Protocol.Server, 0.1.23"
                    
#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.23
                    
#: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.23
                    
Install as a Cake Addin
#tool nuget:?package=Uniform.Matrix.Protocol.Server&version=0.1.23
                    
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.39 0 11/11/2026
0.1.38 0 11/11/2026
0.1.37 0 11/11/2026
0.1.35 0 11/11/2026
0.1.33 0 11/11/2026
0.1.31 0 11/11/2026
0.1.30 0 11/11/2026
0.1.29 0 11/11/2026
0.1.28 7 11/10/2026
0.1.24 41 11/10/2026
0.1.23 52 11/10/2026
0.1.22 45 11/10/2026
0.1.21 46 11/10/2026
0.1.19 57 11/9/2026
0.1.18 52 11/9/2026
0.1.17 46 11/9/2026
0.1.16 52 11/9/2026
0.1.15 56 11/9/2026
0.1.14-rc5 49 11/9/2026
0.1.14-rc4 55 11/9/2026
Loading failed