using Newtonsoft.Json; namespace NostrRelay; public class Fees { [JsonProperty("subscription")] public List Subscription { get; set; } } public class Limitation { [JsonProperty("payment_required")] public bool? PaymentRequired { get; set; } = false; [JsonProperty("max_message_length")] public int? MaxMessageLength { get; set; } /// /// Maximum number of filter values in each subscription. Must be one or higher. /// [JsonProperty("max_filters")] public int? MaxFilters { get; init; } = 1; [JsonProperty("max_event_tags")] public int? MaxEventTags { get; set; } [JsonProperty("max_subscriptions")] public int? MaxSubscriptions { get; set; } [JsonProperty("auth_required")] public bool? AuthRequired { get; set; } [JsonProperty("restricted_writes")] public bool? RestrictedWrites { get; set; } } public class RelayDocument { [JsonProperty("description")] public string? Description { get; set; } [JsonProperty("name")] public string? Name { get; set; } [JsonProperty("pubkey")] public string? Pubkey { get; set; } [JsonProperty("software")] public string? Software { get; set; } [JsonProperty("supported_nips")] public List? SupportedNips { get; set; } [JsonProperty("version")] public string? Version { get; set; } /// /// A URL pointing to an image to be used as an icon for the relay /// [JsonProperty("icon")] public string? Icon { get; init; } [JsonProperty("limitation")] public Limitation? Limitation { get; set; } [JsonProperty("payments_url")] public string? PaymentsUrl { get; set; } [JsonProperty("fees")] public Fees? Fees { get; set; } [JsonProperty("relay_countries")] public List? RelayCountries { get; init; } /// /// Ordered list of IETF language tags indicating the major languages spoken on the relay. /// [JsonProperty("language_tags")] public List? LanguageTags { get; init; } [JsonProperty("tags")] public List? Tags { get; init; } /// /// Link to a human-readable page which specifies the community policies for the relay /// [JsonProperty("posting_policy")] public string? PostingPolicy { get; set; } } public class Subscription { [JsonProperty("amount")] public long? Amount { get; set; } [JsonProperty("unit")] public string Unit { get; set; } = "msats"; [JsonProperty("period")] public int? Period { get; set; } }