From 0640eba992f95cc45873330b76fadf123202d1cd Mon Sep 17 00:00:00 2001 From: Rory& Date: Sun, 11 Jan 2026 16:16:21 +0100 Subject: More federation work --- .../FederationTypes/FederationEvent.cs | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 LibMatrix.Federation/FederationTypes/FederationEvent.cs (limited to 'LibMatrix.Federation/FederationTypes/FederationEvent.cs') diff --git a/LibMatrix.Federation/FederationTypes/FederationEvent.cs b/LibMatrix.Federation/FederationTypes/FederationEvent.cs new file mode 100644 index 0000000..05bdcc9 --- /dev/null +++ b/LibMatrix.Federation/FederationTypes/FederationEvent.cs @@ -0,0 +1,30 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.Federation.FederationTypes; + +public class FederationEvent : MatrixEventResponse { + [JsonPropertyName("auth_events")] + public required List AuthEvents { get; set; } = []; + + [JsonPropertyName("prev_events")] + public required List PrevEvents { get; set; } = []; + + [JsonPropertyName("depth")] + public required int Depth { get; set; } +} + +public class SignedFederationEvent : FederationEvent { + [JsonPropertyName("signatures")] + public required Dictionary> Signatures { get; set; } = new(); + + [JsonPropertyName("hashes")] + public required Dictionary Hashes { get; set; } = new(); +} + +public class FederationEphemeralEvent { + [JsonPropertyName("edu_type")] + public required string Type { get; set; } + + [JsonPropertyName("content")] + public required Dictionary Content { get; set; } = new(); +} \ No newline at end of file -- cgit 1.5.1