Skip to content

Commit

Permalink
added new ServerInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
michielpost committed Nov 6, 2023
1 parent 88d69bf commit 505ad4e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Hathor.Tests/Hathor.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="dotnetstandard-bip39" Version="1.0.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions Hathor.Wallet.Tests/Hathor.Wallet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="dotnetstandard-bip39" Version="1.0.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions Hathor/Hathor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable;CS8600;CS8601;CS8602;CS8603;CS8625;CS8613;CS8610</WarningsAsErrors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.10.0</Version>
<Version>1.11.0</Version>
<Authors>Michiel Post</Authors>
<Description>Client for Hathor Headless Wallet API</Description>
<Copyright>Michiel Post</Copyright>
Expand All @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RestEase" Version="1.6.1" />
<PackageReference Include="RestEase" Version="1.6.4" />
</ItemGroup>

</Project>
36 changes: 35 additions & 1 deletion Hathor/Models/Responses/StatusResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

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; }
Expand All @@ -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; }
}
}

0 comments on commit 505ad4e

Please sign in to comment.