C# Class BitcoinLib.Services.CoinService

Show file Open project: GeorgeKimionis/BitcoinLib

Public Methods

Method Description
AddMultiSigAddress ( int nRquired, List publicKeys, string account ) : string
AddNode ( string node, NodeAction action ) : void
BackupWallet ( string destination ) : void
CoinService ( ) : System
CoinService ( bool useTestnet ) : System
CoinService ( string daemonUrl, string rpcUsername, string rpcPassword, string walletPassword ) : System
CoinService ( string daemonUrl, string rpcUsername, string rpcPassword, string walletPassword, short rpcRequestTimeoutInSeconds ) : System
CreateMultiSig ( int nRquired, List publicKeys ) : CreateMultiSigResponse
CreateRawTransaction ( CreateRawTransactionRequest rawTransaction ) : string
DecodeRawTransaction ( string rawTransactionHexString ) : DecodeRawTransactionResponse
DecodeScript ( string hexString ) : DecodeScriptResponse
DumpPrivKey ( string bitcoinAddress ) : string
DumpWallet ( string filename ) : void
EstimateFee ( ushort nBlocks ) : decimal
EstimatePriority ( ushort nBlocks ) : decimal
GetAccount ( string bitcoinAddress ) : string
GetAccountAddress ( string account ) : string
GetAddedNodeInfo ( string dns, string node ) : GetAddedNodeInfoResponse
GetAddressBalance ( string inWalletAddress, int minConf, bool validateAddressBeforeProcessing ) : decimal
GetAddressesByAccount ( string account ) : List
GetBalance ( string account, int minConf, bool includeWatchonly ) : decimal
GetBestBlockHash ( ) : string
GetBlock ( string hash, bool verbose ) : GetBlockResponse
GetBlockCount ( ) : uint
GetBlockHash ( long index ) : string
GetBlockTemplate ( ) : GetBlockTemplateResponse
GetBlockchainInfo ( ) : GetBlockchainInfoResponse
GetChainTips ( ) : List
GetConnectionCount ( ) : int
GetDifficulty ( ) : double
GetGenerate ( ) : bool
GetImmutableTxId ( string txId, bool getSha256Hash ) : string
GetMemPoolInfo ( ) : GetMemPoolInfoResponse
GetMiningInfo ( ) : GetMiningInfoResponse
GetMyPublicAndPrivateKeyPairs ( ) : string>.Dictionary
GetNetTotals ( ) : GetNetTotalsResponse
GetNetworkHashPs ( uint blocks, long height ) : ulong
GetNetworkInfo ( ) : GetNetworkInfoResponse
GetNewAddress ( string account ) : string
GetPeerInfo ( ) : List
GetPublicTransaction ( string txId ) : DecodeRawTransactionResponse
GetRawChangeAddress ( ) : string
GetRawMemPool ( bool verbose ) : GetRawMemPoolResponse
GetRawTransaction ( string txId, int verbose ) : GetRawTransactionResponse
GetRawTxFromImmutableTxId ( string rigidTxId, int listTransactionsCount, int listTransactionsFrom, bool getRawTransactionVersbose, bool rigidTxIdIsSha256 ) : GetRawTransactionResponse
GetReceivedByAccount ( string account, int minConf ) : decimal
GetReceivedByAddress ( string bitcoinAddress, int minConf ) : decimal
GetTransaction ( string txId, bool includeWatchonly ) : GetTransactionResponse
GetTransactionPriority ( CreateRawTransactionRequest transaction ) : decimal
GetTransactionPriority ( IList transactionInputs, int numberOfOutputs ) : decimal
GetTransactionSizeInBytes ( CreateRawTransactionRequest transaction ) : int
GetTransactionSizeInBytes ( int numberOfInputs, int numberOfOutputs ) : int
GetTxOut ( string txId, int n, bool includeMemPool ) : GetTransactionResponse
GetTxOutSetInfo ( ) : GetTxOutSetInfoResponse
GetUnconfirmedBalance ( ) : decimal
GetWalletInfo ( ) : GetWalletInfoResponse
Help ( string command ) : string
ImportAddress ( string address, string label, bool rescan ) : void
ImportPrivKey ( string privateKey, string label, bool rescan ) : string
ImportWallet ( string filename ) : void
IsInWalletTransaction ( string txId ) : bool
IsTransactionFree ( CreateRawTransactionRequest transaction ) : bool
IsTransactionFree ( IList transactionInputs, int numberOfOutputs, decimal minimumAmountAmongOutputs ) : bool
IsWalletEncrypted ( ) : bool
KeyPoolRefill ( uint newSize ) : string
ListAccounts ( int minConf, bool includeWatchonly ) : decimal>.Dictionary
ListAddressGroupings ( ) : List>
ListLockUnspent ( ) : string
ListReceivedByAccount ( int minConf, bool includeEmpty, bool includeWatchonly ) : List
ListReceivedByAddress ( int minConf, bool includeEmpty, bool includeWatchonly ) : List
ListSinceBlock ( string blockHash, int targetConfirmations, bool includeWatchonly ) : ListSinceBlockResponse
ListTransactions ( string account, int count, int from, bool includeWatchonly ) : List
ListUnspent ( int minConf, int maxConf, List addresses ) : List
LockUnspent ( bool unlock, IList listUnspentResponses ) : bool
Move ( string fromAccount, string toAccount, decimal amount, int minConf, string comment ) : bool
Ping ( ) : void
PrioritiseTransaction ( string txId, decimal priorityDelta, decimal feeDelta ) : bool
SendFrom ( string fromAccount, string toBitcoinAddress, decimal amount, int minConf, string comment, string commentTo ) : string
SendMany ( string fromAccount, decimal>.Dictionary toBitcoinAddress, int minConf, string comment ) : string
SendRawTransaction ( string rawTransactionHexString, bool allowHighFees ) : string
SendToAddress ( string bitcoinAddress, decimal amount, string comment, string commentTo ) : string
SetAccount ( string bitcoinAddress, string account ) : string
SetGenerate ( bool generate, short generatingProcessorsLimit ) : string
SetTxFee ( decimal amount ) : string
SignMessage ( string bitcoinAddress, string message ) : string
SignRawTransaction ( SignRawTransactionRequest request ) : SignRawTransactionResponse
Stop ( ) : string
SubmitBlock ( string hexData ) : string
ToString ( ) : string
ValidateAddress ( string bitcoinAddress ) : ValidateAddressResponse
VerifyChain ( ushort checkLevel, uint numBlocks ) : bool
VerifyMessage ( string bitcoinAddress, string signature, string message ) : bool
WalletLock ( ) : string
WalletPassphrase ( string passphrase, int timeoutInSeconds ) : string
WalletPassphraseChange ( string oldPassphrase, string newPassphrase ) : string

Private Methods

Method Description
GetInfo ( ) : GetInfoResponse
GetMinimumNonZeroTransactionFeeEstimate ( short numberOfInputs = 1, short numberOfOutputs = 1 ) : decimal
GetTransactionFee ( CreateRawTransactionRequest transaction, bool checkIfTransactionQualifiesForFreeRelay, bool enforceMinimumTransactionFeePolicy ) : decimal
GetTransactionSenderAddress ( string txId ) : string

Method Details

AddMultiSigAddress() public method

public AddMultiSigAddress ( int nRquired, List publicKeys, string account ) : string
nRquired int
publicKeys List
account string
return string

AddNode() public method

public AddNode ( string node, NodeAction action ) : void
node string
action NodeAction
return void

BackupWallet() public method

public BackupWallet ( string destination ) : void
destination string
return void

CoinService() public method

public CoinService ( ) : System
return System

CoinService() public method

public CoinService ( bool useTestnet ) : System
useTestnet bool
return System

CoinService() public method

public CoinService ( string daemonUrl, string rpcUsername, string rpcPassword, string walletPassword ) : System
daemonUrl string
rpcUsername string
rpcPassword string
walletPassword string
return System

CoinService() public method

public CoinService ( string daemonUrl, string rpcUsername, string rpcPassword, string walletPassword, short rpcRequestTimeoutInSeconds ) : System
daemonUrl string
rpcUsername string
rpcPassword string
walletPassword string
rpcRequestTimeoutInSeconds short
return System

CreateMultiSig() public method

public CreateMultiSig ( int nRquired, List publicKeys ) : CreateMultiSigResponse
nRquired int
publicKeys List
return CreateMultiSigResponse

CreateRawTransaction() public method

public CreateRawTransaction ( CreateRawTransactionRequest rawTransaction ) : string
rawTransaction CreateRawTransactionRequest
return string

DecodeRawTransaction() public method

public DecodeRawTransaction ( string rawTransactionHexString ) : DecodeRawTransactionResponse
rawTransactionHexString string
return DecodeRawTransactionResponse

DecodeScript() public method

public DecodeScript ( string hexString ) : DecodeScriptResponse
hexString string
return DecodeScriptResponse

DumpPrivKey() public method

public DumpPrivKey ( string bitcoinAddress ) : string
bitcoinAddress string
return string

DumpWallet() public method

public DumpWallet ( string filename ) : void
filename string
return void

EstimateFee() public method

public EstimateFee ( ushort nBlocks ) : decimal
nBlocks ushort
return decimal

EstimatePriority() public method

public EstimatePriority ( ushort nBlocks ) : decimal
nBlocks ushort
return decimal

GetAccount() public method

public GetAccount ( string bitcoinAddress ) : string
bitcoinAddress string
return string

GetAccountAddress() public method

public GetAccountAddress ( string account ) : string
account string
return string

GetAddedNodeInfo() public method

public GetAddedNodeInfo ( string dns, string node ) : GetAddedNodeInfoResponse
dns string
node string
return GetAddedNodeInfoResponse

GetAddressBalance() public method

public GetAddressBalance ( string inWalletAddress, int minConf, bool validateAddressBeforeProcessing ) : decimal
inWalletAddress string
minConf int
validateAddressBeforeProcessing bool
return decimal

GetAddressesByAccount() public method

public GetAddressesByAccount ( string account ) : List
account string
return List

GetBalance() public method

public GetBalance ( string account, int minConf, bool includeWatchonly ) : decimal
account string
minConf int
includeWatchonly bool
return decimal

GetBestBlockHash() public method

public GetBestBlockHash ( ) : string
return string

GetBlock() public method

public GetBlock ( string hash, bool verbose ) : GetBlockResponse
hash string
verbose bool
return GetBlockResponse

GetBlockCount() public method

public GetBlockCount ( ) : uint
return uint

GetBlockHash() public method

public GetBlockHash ( long index ) : string
index long
return string

GetBlockTemplate() public method

public GetBlockTemplate ( ) : GetBlockTemplateResponse
return GetBlockTemplateResponse

GetBlockchainInfo() public method

public GetBlockchainInfo ( ) : GetBlockchainInfoResponse
return GetBlockchainInfoResponse

GetChainTips() public method

public GetChainTips ( ) : List
return List

GetConnectionCount() public method

public GetConnectionCount ( ) : int
return int

GetDifficulty() public method

public GetDifficulty ( ) : double
return double

GetGenerate() public method

public GetGenerate ( ) : bool
return bool

GetImmutableTxId() public method

public GetImmutableTxId ( string txId, bool getSha256Hash ) : string
txId string
getSha256Hash bool
return string

GetMemPoolInfo() public method

public GetMemPoolInfo ( ) : GetMemPoolInfoResponse
return GetMemPoolInfoResponse

GetMiningInfo() public method

public GetMiningInfo ( ) : GetMiningInfoResponse
return GetMiningInfoResponse

GetMyPublicAndPrivateKeyPairs() public method

public GetMyPublicAndPrivateKeyPairs ( ) : string>.Dictionary
return string>.Dictionary

GetNetTotals() public method

public GetNetTotals ( ) : GetNetTotalsResponse
return GetNetTotalsResponse

GetNetworkHashPs() public method

public GetNetworkHashPs ( uint blocks, long height ) : ulong
blocks uint
height long
return ulong

GetNetworkInfo() public method

public GetNetworkInfo ( ) : GetNetworkInfoResponse
return GetNetworkInfoResponse

GetNewAddress() public method

public GetNewAddress ( string account ) : string
account string
return string

GetPeerInfo() public method

public GetPeerInfo ( ) : List
return List

GetPublicTransaction() public method

public GetPublicTransaction ( string txId ) : DecodeRawTransactionResponse
txId string
return DecodeRawTransactionResponse

GetRawChangeAddress() public method

public GetRawChangeAddress ( ) : string
return string

GetRawMemPool() public method

public GetRawMemPool ( bool verbose ) : GetRawMemPoolResponse
verbose bool
return GetRawMemPoolResponse

GetRawTransaction() public method

public GetRawTransaction ( string txId, int verbose ) : GetRawTransactionResponse
txId string
verbose int
return GetRawTransactionResponse

GetRawTxFromImmutableTxId() public method

public GetRawTxFromImmutableTxId ( string rigidTxId, int listTransactionsCount, int listTransactionsFrom, bool getRawTransactionVersbose, bool rigidTxIdIsSha256 ) : GetRawTransactionResponse
rigidTxId string
listTransactionsCount int
listTransactionsFrom int
getRawTransactionVersbose bool
rigidTxIdIsSha256 bool
return GetRawTransactionResponse

GetReceivedByAccount() public method

public GetReceivedByAccount ( string account, int minConf ) : decimal
account string
minConf int
return decimal

GetReceivedByAddress() public method

public GetReceivedByAddress ( string bitcoinAddress, int minConf ) : decimal
bitcoinAddress string
minConf int
return decimal

GetTransaction() public method

public GetTransaction ( string txId, bool includeWatchonly ) : GetTransactionResponse
txId string
includeWatchonly bool
return GetTransactionResponse

GetTransactionPriority() public method

public GetTransactionPriority ( CreateRawTransactionRequest transaction ) : decimal
transaction CreateRawTransactionRequest
return decimal

GetTransactionPriority() public method

public GetTransactionPriority ( IList transactionInputs, int numberOfOutputs ) : decimal
transactionInputs IList
numberOfOutputs int
return decimal

GetTransactionSizeInBytes() public method

public GetTransactionSizeInBytes ( CreateRawTransactionRequest transaction ) : int
transaction CreateRawTransactionRequest
return int

GetTransactionSizeInBytes() public method

public GetTransactionSizeInBytes ( int numberOfInputs, int numberOfOutputs ) : int
numberOfInputs int
numberOfOutputs int
return int

GetTxOut() public method

public GetTxOut ( string txId, int n, bool includeMemPool ) : GetTransactionResponse
txId string
n int
includeMemPool bool
return GetTransactionResponse

GetTxOutSetInfo() public method

public GetTxOutSetInfo ( ) : GetTxOutSetInfoResponse
return GetTxOutSetInfoResponse

GetUnconfirmedBalance() public method

public GetUnconfirmedBalance ( ) : decimal
return decimal

GetWalletInfo() public method

public GetWalletInfo ( ) : GetWalletInfoResponse
return GetWalletInfoResponse

Help() public method

public Help ( string command ) : string
command string
return string

ImportAddress() public method

public ImportAddress ( string address, string label, bool rescan ) : void
address string
label string
rescan bool
return void

ImportPrivKey() public method

public ImportPrivKey ( string privateKey, string label, bool rescan ) : string
privateKey string
label string
rescan bool
return string

ImportWallet() public method

public ImportWallet ( string filename ) : void
filename string
return void

IsInWalletTransaction() public method

public IsInWalletTransaction ( string txId ) : bool
txId string
return bool

IsTransactionFree() public method

public IsTransactionFree ( CreateRawTransactionRequest transaction ) : bool
transaction CreateRawTransactionRequest
return bool

IsTransactionFree() public method

public IsTransactionFree ( IList transactionInputs, int numberOfOutputs, decimal minimumAmountAmongOutputs ) : bool
transactionInputs IList
numberOfOutputs int
minimumAmountAmongOutputs decimal
return bool

IsWalletEncrypted() public method

public IsWalletEncrypted ( ) : bool
return bool

KeyPoolRefill() public method

public KeyPoolRefill ( uint newSize ) : string
newSize uint
return string

ListAccounts() public method

public ListAccounts ( int minConf, bool includeWatchonly ) : decimal>.Dictionary
minConf int
includeWatchonly bool
return decimal>.Dictionary

ListAddressGroupings() public method

public ListAddressGroupings ( ) : List>
return List>

ListLockUnspent() public method

public ListLockUnspent ( ) : string
return string

ListReceivedByAccount() public method

public ListReceivedByAccount ( int minConf, bool includeEmpty, bool includeWatchonly ) : List
minConf int
includeEmpty bool
includeWatchonly bool
return List

ListReceivedByAddress() public method

public ListReceivedByAddress ( int minConf, bool includeEmpty, bool includeWatchonly ) : List
minConf int
includeEmpty bool
includeWatchonly bool
return List

ListSinceBlock() public method

public ListSinceBlock ( string blockHash, int targetConfirmations, bool includeWatchonly ) : ListSinceBlockResponse
blockHash string
targetConfirmations int
includeWatchonly bool
return ListSinceBlockResponse

ListTransactions() public method

public ListTransactions ( string account, int count, int from, bool includeWatchonly ) : List
account string
count int
from int
includeWatchonly bool
return List

ListUnspent() public method

public ListUnspent ( int minConf, int maxConf, List addresses ) : List
minConf int
maxConf int
addresses List
return List

LockUnspent() public method

public LockUnspent ( bool unlock, IList listUnspentResponses ) : bool
unlock bool
listUnspentResponses IList
return bool

Move() public method

public Move ( string fromAccount, string toAccount, decimal amount, int minConf, string comment ) : bool
fromAccount string
toAccount string
amount decimal
minConf int
comment string
return bool

Ping() public method

public Ping ( ) : void
return void

PrioritiseTransaction() public method

public PrioritiseTransaction ( string txId, decimal priorityDelta, decimal feeDelta ) : bool
txId string
priorityDelta decimal
feeDelta decimal
return bool

SendFrom() public method

public SendFrom ( string fromAccount, string toBitcoinAddress, decimal amount, int minConf, string comment, string commentTo ) : string
fromAccount string
toBitcoinAddress string
amount decimal
minConf int
comment string
commentTo string
return string

SendMany() public method

public SendMany ( string fromAccount, decimal>.Dictionary toBitcoinAddress, int minConf, string comment ) : string
fromAccount string
toBitcoinAddress decimal>.Dictionary
minConf int
comment string
return string

SendRawTransaction() public method

public SendRawTransaction ( string rawTransactionHexString, bool allowHighFees ) : string
rawTransactionHexString string
allowHighFees bool
return string

SendToAddress() public method

public SendToAddress ( string bitcoinAddress, decimal amount, string comment, string commentTo ) : string
bitcoinAddress string
amount decimal
comment string
commentTo string
return string

SetAccount() public method

public SetAccount ( string bitcoinAddress, string account ) : string
bitcoinAddress string
account string
return string

SetGenerate() public method

public SetGenerate ( bool generate, short generatingProcessorsLimit ) : string
generate bool
generatingProcessorsLimit short
return string

SetTxFee() public method

public SetTxFee ( decimal amount ) : string
amount decimal
return string

SignMessage() public method

public SignMessage ( string bitcoinAddress, string message ) : string
bitcoinAddress string
message string
return string

SignRawTransaction() public method

public SignRawTransaction ( SignRawTransactionRequest request ) : SignRawTransactionResponse
request SignRawTransactionRequest
return SignRawTransactionResponse

Stop() public method

public Stop ( ) : string
return string

SubmitBlock() public method

public SubmitBlock ( string hexData ) : string
hexData string
return string

ToString() public method

public ToString ( ) : string
return string

ValidateAddress() public method

public ValidateAddress ( string bitcoinAddress ) : ValidateAddressResponse
bitcoinAddress string
return ValidateAddressResponse

VerifyChain() public method

public VerifyChain ( ushort checkLevel, uint numBlocks ) : bool
checkLevel ushort
numBlocks uint
return bool

VerifyMessage() public method

public VerifyMessage ( string bitcoinAddress, string signature, string message ) : bool
bitcoinAddress string
signature string
message string
return bool

WalletLock() public method

public WalletLock ( ) : string
return string

WalletPassphrase() public method

public WalletPassphrase ( string passphrase, int timeoutInSeconds ) : string
passphrase string
timeoutInSeconds int
return string

WalletPassphraseChange() public method

public WalletPassphraseChange ( string oldPassphrase, string newPassphrase ) : string
oldPassphrase string
newPassphrase string
return string