Skip to content

Commit

Permalink
Merge pull request #75 from pushist1y/feature/estimatesmartfee_support
Browse files Browse the repository at this point in the history
Added support for estimatesmartfee method
  • Loading branch information
moodmosaic committed Mar 22, 2018
2 parents 3e76961 + a44dd6c commit 44e2ad5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/BitcoinLib/Responses/EstimateSmartFeeResponse.cs
@@ -0,0 +1,11 @@
using System.Collections.Generic;

namespace BitcoinLib.Responses
{
public class EstimateSmartFeeResponse
{
public decimal? FeeRate { get; set; }
public uint? Blocks { get; set; }
public IList<string> Errors { get; set; }
}
}
Expand Up @@ -89,6 +89,7 @@ public interface IRpcService

CreateMultiSigResponse CreateMultiSig(int nRquired, List<string> publicKeys);
decimal EstimateFee(ushort nBlocks);
EstimateSmartFeeResponse EstimateSmartFee(ushort nBlocks);
decimal EstimatePriority(ushort nBlocks);
// estimatesmartfee
// estimatesmartpriority
Expand Down
5 changes: 5 additions & 0 deletions src/BitcoinLib/Services/RpcServices/RpcService/RpcService.cs
Expand Up @@ -101,6 +101,11 @@ public decimal EstimateFee(ushort nBlocks)
return _rpcConnector.MakeRequest<decimal>(RpcMethods.estimatefee, nBlocks);
}

public EstimateSmartFeeResponse EstimateSmartFee(ushort nBlocks)
{
return _rpcConnector.MakeRequest<EstimateSmartFeeResponse>(RpcMethods.estimatesmartfee, nBlocks);
}

public decimal EstimatePriority(ushort nBlocks)
{
return _rpcConnector.MakeRequest<decimal>(RpcMethods.estimatepriority, nBlocks);
Expand Down

0 comments on commit 44e2ad5

Please sign in to comment.