From 505ad4edfeb86fd77d8d779fa451c75b392a1c65 Mon Sep 17 00:00:00 2001 From: Michiel Post Date: Mon, 6 Nov 2023 15:02:00 +0100 Subject: [PATCH] added new ServerInfo --- Hathor.Tests/Hathor.Tests.csproj | 8 ++--- .../Hathor.Wallet.Tests.csproj | 8 ++--- Hathor/Hathor.csproj | 4 +-- Hathor/Models/Responses/StatusResponse.cs | 36 ++++++++++++++++++- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/Hathor.Tests/Hathor.Tests.csproj b/Hathor.Tests/Hathor.Tests.csproj index 9ec13cb..ab9a946 100644 --- a/Hathor.Tests/Hathor.Tests.csproj +++ b/Hathor.Tests/Hathor.Tests.csproj @@ -7,11 +7,11 @@ - + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Hathor.Wallet.Tests/Hathor.Wallet.Tests.csproj b/Hathor.Wallet.Tests/Hathor.Wallet.Tests.csproj index 89073bc..606c0cd 100644 --- a/Hathor.Wallet.Tests/Hathor.Wallet.Tests.csproj +++ b/Hathor.Wallet.Tests/Hathor.Wallet.Tests.csproj @@ -7,11 +7,11 @@ - + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Hathor/Hathor.csproj b/Hathor/Hathor.csproj index 4c24b8e..d4f41a3 100644 --- a/Hathor/Hathor.csproj +++ b/Hathor/Hathor.csproj @@ -5,7 +5,7 @@ enable nullable;CS8600;CS8601;CS8602;CS8603;CS8625;CS8613;CS8610 true - 1.10.0 + 1.11.0 Michiel Post Client for Hathor Headless Wallet API Michiel Post @@ -16,7 +16,7 @@ - + diff --git a/Hathor/Models/Responses/StatusResponse.cs b/Hathor/Models/Responses/StatusResponse.cs index 3b19552..b0e06eb 100644 --- a/Hathor/Models/Responses/StatusResponse.cs +++ b/Hathor/Models/Responses/StatusResponse.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Hathor.Models.Responses @@ -10,7 +11,7 @@ namespace Hathor.Models.Responses public class StatusResponse : DefaultResponse { [JsonProperty(PropertyName = "serverInfo")] - public string? ServerInfo { get; set; } + public ServerInfo? ServerInfo { get; set; } [JsonProperty(PropertyName = "statusCode")] public int? StatusCode { get; set; } @@ -24,4 +25,37 @@ public class StatusResponse : DefaultResponse [JsonProperty(PropertyName = "state")] public int? State { get; set; } } + + public class ServerInfo + { + [JsonProperty("version")] + public string? Version { get; set; } + + [JsonProperty("network")] + public string? Network { get; set; } + + [JsonProperty("min_weight")] + public int MinWeight { get; set; } + + [JsonProperty("min_tx_weight")] + public int MinTxWeight { get; set; } + + [JsonProperty("min_tx_weight_coefficient")] + public double MinTxWeightCoefficient { get; set; } + + [JsonProperty("min_tx_weight_k")] + public int MinTxWeightK { get; set; } + + [JsonProperty("token_deposit_percentage")] + public double TokenDepositPercentage { get; set; } + + [JsonProperty("reward_spend_min_blocks")] + public int RewardSpendMinBlocks { get; set; } + + [JsonProperty("max_number_inputs")] + public int MaxNumberInputs { get; set; } + + [JsonProperty("max_number_outputs")] + public int MaxNumberOutputs { get; set; } + } }