Uniform.Matrix.Protocol.Server
0.1.8-rc4
See the version list below for details.
dotnet add package Uniform.Matrix.Protocol.Server --version 0.1.8-rc4
NuGet\Install-Package Uniform.Matrix.Protocol.Server -Version 0.1.8-rc4
<PackageReference Include="Uniform.Matrix.Protocol.Server" Version="0.1.8-rc4" />
<PackageVersion Include="Uniform.Matrix.Protocol.Server" Version="0.1.8-rc4" />
<PackageReference Include="Uniform.Matrix.Protocol.Server" />
paket add Uniform.Matrix.Protocol.Server --version 0.1.8-rc4
#r "nuget: Uniform.Matrix.Protocol.Server, 0.1.8-rc4"
#:package Uniform.Matrix.Protocol.Server@0.1.8-rc4
#addin nuget:?package=Uniform.Matrix.Protocol.Server&version=0.1.8-rc4&prerelease
#tool nuget:?package=Uniform.Matrix.Protocol.Server&version=0.1.8-rc4&prerelease
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 | 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
- Uniform.Matrix.Protocol.Core (>= 0.1.8-rc4)
- Uniform.Matrix.Protocol.Crypto (>= 0.1.8-rc4)
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.