Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Commit

Permalink
add method Signatures_Fee()
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronAP committed Jun 30, 2016
1 parent a311d5f commit 058e52a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions Lisk.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<Compile Include="Responses\peers_get_response.cs" />
<Compile Include="Responses\Peer_Object.cs" />
<Compile Include="Responses\signatures_add_response.cs" />
<Compile Include="Responses\signatures_fee_response.cs" />
<Compile Include="Responses\signatures_get_response.cs" />
<Compile Include="Responses\Signature_Object.cs" />
<Compile Include="Responses\transactions_getListUnconfirmed_response.cs" />
Expand Down
11 changes: 11 additions & 0 deletions LiskAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,17 @@ public async Task<signatures_add_response> Signatures_Add(string secret, string
return pr.StartsWith("ERROR") ? new signatures_add_response {error = pr, success = false} : JsonConvert.DeserializeObject<signatures_add_response>(pr);
}

/// <summary>
/// Get the fee for a signature.
/// </summary>
/// <returns></returns>
public async Task<signatures_fee_response> Signatures_Fee()
{
const string url = "/api/signatures/fee";
var gr = await HttpGetRequestAsync(url, User_Agent);
return gr.StartsWith("ERROR") ? new signatures_fee_response { error = gr, success = false } : JsonConvert.DeserializeObject<signatures_fee_response>(gr);
}

/// <summary>
/// Get the total number of registered delegates.
/// </summary>
Expand Down
10 changes: 10 additions & 0 deletions Responses/signatures_fee_response.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Newtonsoft.Json;

namespace Lisk.API.Responses
{
[JsonObject(MemberSerialization = MemberSerialization.Fields)]
public class signatures_fee_response : BaseResponse
{
public long fee;
}
}

0 comments on commit 058e52a

Please sign in to comment.