Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/BitcoinLib/Services/RpcServices/RpcService/IRpcService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace BitcoinLib.Services.RpcServices.RpcService
public interface IRpcService
{
String AddMultiSigAddress(Int32 nRquired, List<String> publicKeys, String account = null);
String AddNode(String node, NodeAction action);
String BackupWallet(String destination);
void AddNode(String node, NodeAction action);
void BackupWallet(String destination);
CreateMultiSigResponse CreateMultiSig(Int32 nRquired, List<String> publicKeys);
String CreateRawTransaction(CreateRawTransactionRequest rawTransaction);
DecodeRawTransactionResponse DecodeRawTransaction(String rawTransactionHexString);
Expand All @@ -38,7 +38,7 @@ public interface IRpcService
List<GetChainTipsResponse> GetChainTips();
Int32 GetConnectionCount();
Double GetDifficulty();
String GetGenerate();
Boolean GetGenerate();
Int32 GetHashesPerSec();
GetInfoResponse GetInfo();
GetMemPoolInfoResponse GetMemPoolInfo();
Expand All @@ -51,8 +51,8 @@ public interface IRpcService
String GetRawChangeAddress();
GetRawMemPoolResponse GetRawMemPool(Boolean verbose = false);
GetRawTransactionResponse GetRawTransaction(String txId, Int32 verbose = 0);
String GetReceivedByAccount(String account, Int32 minConf = 1);
String GetReceivedByAddress(String bitcoinAddress, Int32 minConf = 1);
Decimal GetReceivedByAccount(String account, Int32 minConf = 1);
Decimal GetReceivedByAddress(String bitcoinAddress, Int32 minConf = 1);
GetTransactionResponse GetTransaction(String txId, Boolean? includeWatchonly = null);
GetTransactionResponse GetTxOut(String txId, Int32 n, Boolean includeMemPool = true);
GetTxOutSetInfoResponse GetTxOutSetInfo();
Expand Down Expand Up @@ -88,7 +88,7 @@ public interface IRpcService
String SubmitBlock(String hexData, params Object[] parameters);
ValidateAddressResponse ValidateAddress(String bitcoinAddress);
Boolean VerifyChain(UInt16 checkLevel = 3, UInt32 numBlocks = 288); // Note: numBlocks: 0 => ALL
String VerifyMessage(String bitcoinAddress, String signature, String message);
Boolean VerifyMessage(String bitcoinAddress, String signature, String message);
String WalletLock();
String WalletPassphrase(String passphrase, Int32 timeoutInSeconds);
String WalletPassphraseChange(String oldPassphrase, String newPassphrase);
Expand Down
24 changes: 12 additions & 12 deletions src/BitcoinLib/Services/RpcServices/RpcService/RpcService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ public String AddMultiSigAddress(Int32 nRquired, List<String> publicKeys, String
: _rpcConnector.MakeRequest<String>(RpcMethods.addmultisigaddress, nRquired, publicKeys);
}

public String AddNode(String node, NodeAction action)
public void AddNode(String node, NodeAction action)
{
return _rpcConnector.MakeRequest<String>(RpcMethods.addnode, node, action.ToString());
_rpcConnector.MakeRequest<String>(RpcMethods.addnode, node, action.ToString());
}

public String BackupWallet(String destination)
public void BackupWallet(String destination)
{
return _rpcConnector.MakeRequest<String>(RpcMethods.backupwallet, destination);
_rpcConnector.MakeRequest<String>(RpcMethods.backupwallet, destination);
}

public CreateMultiSigResponse CreateMultiSig(Int32 nRquired, List<String> publicKeys)
Expand Down Expand Up @@ -182,9 +182,9 @@ public Double GetDifficulty()
return _rpcConnector.MakeRequest<Double>(RpcMethods.getdifficulty);
}

public String GetGenerate()
public Boolean GetGenerate()
{
return _rpcConnector.MakeRequest<String>(RpcMethods.getgenerate);
return _rpcConnector.MakeRequest<Boolean>(RpcMethods.getgenerate);
}

public Int32 GetHashesPerSec()
Expand Down Expand Up @@ -377,14 +377,14 @@ public GetRawTransactionResponse GetRawTransaction(String txId, Int32 verbose)
throw new Exception("Invalid verbose value: " + verbose + " in GetRawTransaction()!");
}

public String GetReceivedByAccount(String account, Int32 minConf)
public Decimal GetReceivedByAccount(String account, Int32 minConf)
{
return _rpcConnector.MakeRequest<String>(RpcMethods.getreceivedbyaccount, account, minConf);
return _rpcConnector.MakeRequest<Decimal>(RpcMethods.getreceivedbyaccount, account, minConf);
}

public String GetReceivedByAddress(String bitcoinAddress, Int32 minConf)
public Decimal GetReceivedByAddress(String bitcoinAddress, Int32 minConf)
{
return _rpcConnector.MakeRequest<String>(RpcMethods.getreceivedbyaddress, bitcoinAddress, minConf);
return _rpcConnector.MakeRequest<Decimal>(RpcMethods.getreceivedbyaddress, bitcoinAddress, minConf);
}

public GetTransactionResponse GetTransaction(String txId, Boolean? includeWatchonly)
Expand Down Expand Up @@ -637,9 +637,9 @@ public Boolean VerifyChain(UInt16 checkLevel, UInt32 numBlocks)
return _rpcConnector.MakeRequest<Boolean>(RpcMethods.verifychain, checkLevel, numBlocks);
}

public String VerifyMessage(String bitcoinAddress, String signature, String message)
public Boolean VerifyMessage(String bitcoinAddress, String signature, String message)
{
return _rpcConnector.MakeRequest<String>(RpcMethods.verifymessage, bitcoinAddress, signature, message);
return _rpcConnector.MakeRequest<Boolean>(RpcMethods.verifymessage, bitcoinAddress, signature, message);
}

public String WalletLock()
Expand Down