1 files changed, 30 insertions, 0 deletions
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<string> AuthEvents { get; set; } = [];
+
+ [JsonPropertyName("prev_events")]
+ public required List<string> PrevEvents { get; set; } = [];
+
+ [JsonPropertyName("depth")]
+ public required int Depth { get; set; }
+}
+
+public class SignedFederationEvent : FederationEvent {
+ [JsonPropertyName("signatures")]
+ public required Dictionary<string, Dictionary<string, string>> Signatures { get; set; } = new();
+
+ [JsonPropertyName("hashes")]
+ public required Dictionary<string, string> Hashes { get; set; } = new();
+}
+
+public class FederationEphemeralEvent {
+ [JsonPropertyName("edu_type")]
+ public required string Type { get; set; }
+
+ [JsonPropertyName("content")]
+ public required Dictionary<string, object> Content { get; set; } = new();
+}
\ No newline at end of file
|