public class BitcoinJSONRPCClient extends Object implements BitcoindRpcClient
BitcoindRpcClient.AddressValidationResult, BitcoindRpcClient.BasicTxInput, BitcoindRpcClient.BasicTxOutput, BitcoindRpcClient.Block, BitcoindRpcClient.BlockChainInfo, BitcoindRpcClient.RawTransaction, BitcoindRpcClient.ReceivedAddress, BitcoindRpcClient.Transaction, BitcoindRpcClient.TransactionsSinceBlock, BitcoindRpcClient.TxInput, BitcoindRpcClient.TxOutput, BitcoindRpcClient.Unspent| Modifier and Type | Field and Description |
|---|---|
static URL |
DEFAULT_JSONRPC_TESTNET_URL |
static URL |
DEFAULT_JSONRPC_URL |
static Charset |
QUERY_CHARSET |
URL |
rpcURL |
| Constructor and Description |
|---|
BitcoinJSONRPCClient() |
BitcoinJSONRPCClient(boolean testNet) |
BitcoinJSONRPCClient(String rpcUrl) |
BitcoinJSONRPCClient(URL rpc) |
public final URL rpcURL
public static final URL DEFAULT_JSONRPC_URL
public static final URL DEFAULT_JSONRPC_TESTNET_URL
public static final Charset QUERY_CHARSET
public BitcoinJSONRPCClient(String rpcUrl) throws MalformedURLException
MalformedURLExceptionpublic BitcoinJSONRPCClient(URL rpc)
public BitcoinJSONRPCClient(boolean testNet)
public BitcoinJSONRPCClient()
public HostnameVerifier getHostnameVerifier()
public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
public SSLSocketFactory getSslSocketFactory()
public void setSslSocketFactory(SSLSocketFactory sslSocketFactory)
public Object loadResponse(InputStream in, Object expectedID, boolean close) throws IOException, BitcoinRpcException
IOExceptionBitcoinRpcExceptionpublic Object query(String method, Object... o) throws BitcoinRpcException
BitcoinRpcExceptionpublic String createRawTransaction(List<BitcoindRpcClient.TxInput> inputs, List<BitcoindRpcClient.TxOutput> outputs) throws BitcoinRpcException
createRawTransaction in interface BitcoindRpcClientBitcoinRpcExceptionpublic String dumpPrivKey(String address) throws BitcoinRpcException
dumpPrivKey in interface BitcoindRpcClientBitcoinRpcExceptionpublic String getAccount(String address) throws BitcoinRpcException
getAccount in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<String> getAddressesByAccount(String account) throws BitcoinRpcException
getAddressesByAccount in interface BitcoindRpcClientBitcoinRpcExceptionpublic double getBalance()
throws BitcoinRpcException
getBalance in interface BitcoindRpcClientBitcoinRpcExceptionpublic double getBalance(String account) throws BitcoinRpcException
getBalance in interface BitcoindRpcClientBitcoinRpcExceptionpublic double getBalance(String account, int minConf) throws BitcoinRpcException
getBalance in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.Block getBlock(int height) throws BitcoinRpcException
getBlock in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.Block getBlock(String blockHash) throws BitcoinRpcException
getBlock in interface BitcoindRpcClientBitcoinRpcExceptionpublic String getBlockHash(int height) throws BitcoinRpcException
getBlockHash in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.BlockChainInfo getBlockChainInfo() throws BitcoinRpcException
getBlockChainInfo in interface BitcoindRpcClientBitcoinRpcExceptionpublic int getBlockCount()
throws BitcoinRpcException
getBlockCount in interface BitcoindRpcClientBitcoinRpcExceptionpublic String getNewAddress() throws BitcoinRpcException
getNewAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic String getNewAddress(String account) throws BitcoinRpcException
getNewAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<String> getRawMemPool() throws BitcoinRpcException
getRawMemPool in interface BitcoindRpcClientBitcoinRpcExceptionpublic String getBestBlockHash() throws BitcoinRpcException
getBestBlockHash in interface BitcoindRpcClientBitcoinRpcExceptionpublic String getRawTransactionHex(String txId) throws BitcoinRpcException
getRawTransactionHex in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.RawTransaction getRawTransaction(String txId) throws BitcoinRpcException
getRawTransaction in interface BitcoindRpcClientBitcoinRpcExceptionpublic double getReceivedByAddress(String address) throws BitcoinRpcException
getReceivedByAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic double getReceivedByAddress(String address, int minConf) throws BitcoinRpcException
BitcoindRpcClientgetReceivedByAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic void importPrivKey(String bitcoinPrivKey) throws BitcoinRpcException
importPrivKey in interface BitcoindRpcClientBitcoinRpcExceptionpublic void importPrivKey(String bitcoinPrivKey, String label) throws BitcoinRpcException
importPrivKey in interface BitcoindRpcClientBitcoinRpcExceptionpublic void importPrivKey(String bitcoinPrivKey, String label, boolean rescan) throws BitcoinRpcException
importPrivKey in interface BitcoindRpcClientBitcoinRpcExceptionpublic Map<String,Number> listAccounts() throws BitcoinRpcException
BitcoindRpcClientlistAccounts in interface BitcoindRpcClientBitcoinRpcExceptionpublic Map<String,Number> listAccounts(int minConf) throws BitcoinRpcException
listAccounts in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.ReceivedAddress> listReceivedByAddress() throws BitcoinRpcException
listReceivedByAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.ReceivedAddress> listReceivedByAddress(int minConf) throws BitcoinRpcException
listReceivedByAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.ReceivedAddress> listReceivedByAddress(int minConf, boolean includeEmpty) throws BitcoinRpcException
listReceivedByAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.TransactionsSinceBlock listSinceBlock() throws BitcoinRpcException
listSinceBlock in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.TransactionsSinceBlock listSinceBlock(String blockHash) throws BitcoinRpcException
listSinceBlock in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.TransactionsSinceBlock listSinceBlock(String blockHash, int targetConfirmations) throws BitcoinRpcException
listSinceBlock in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Transaction> listTransactions() throws BitcoinRpcException
listTransactions in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Transaction> listTransactions(String account) throws BitcoinRpcException
listTransactions in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Transaction> listTransactions(String account, int count) throws BitcoinRpcException
listTransactions in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Transaction> listTransactions(String account, int count, int from) throws BitcoinRpcException
listTransactions in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Unspent> listUnspent() throws BitcoinRpcException
listUnspent in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Unspent> listUnspent(int minConf) throws BitcoinRpcException
listUnspent in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Unspent> listUnspent(int minConf, int maxConf) throws BitcoinRpcException
listUnspent in interface BitcoindRpcClientBitcoinRpcExceptionpublic List<BitcoindRpcClient.Unspent> listUnspent(int minConf, int maxConf, String... addresses) throws BitcoinRpcException
listUnspent in interface BitcoindRpcClientBitcoinRpcExceptionpublic String sendFrom(String fromAccount, String toBitcoinAddress, double amount) throws BitcoinRpcException
sendFrom in interface BitcoindRpcClientBitcoinRpcExceptionpublic String sendFrom(String fromAccount, String toBitcoinAddress, double amount, int minConf) throws BitcoinRpcException
sendFrom in interface BitcoindRpcClientBitcoinRpcExceptionpublic String sendFrom(String fromAccount, String toBitcoinAddress, double amount, int minConf, String comment) throws BitcoinRpcException
sendFrom in interface BitcoindRpcClientBitcoinRpcExceptionpublic String sendFrom(String fromAccount, String toBitcoinAddress, double amount, int minConf, String comment, String commentTo) throws BitcoinRpcException
BitcoindRpcClientsendFrom in interface BitcoindRpcClientamount - is a real and is rounded to 8 decimal placesBitcoinRpcExceptionpublic String sendRawTransaction(String hex) throws BitcoinRpcException
sendRawTransaction in interface BitcoindRpcClientBitcoinRpcExceptionpublic String sendToAddress(String toAddress, double amount) throws BitcoinRpcException
sendToAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic String sendToAddress(String toAddress, double amount, String comment) throws BitcoinRpcException
sendToAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic String sendToAddress(String toAddress, double amount, String comment, String commentTo) throws BitcoinRpcException
sendToAddress in interface BitcoindRpcClientamount - is a real and is rounded to 8 decimal placesBitcoinRpcExceptionpublic String signRawTransaction(String hex) throws BitcoinRpcException
signRawTransaction in interface BitcoindRpcClientBitcoinRpcExceptionpublic BitcoindRpcClient.AddressValidationResult validateAddress(String address) throws BitcoinRpcException
validateAddress in interface BitcoindRpcClientBitcoinRpcExceptionpublic void setGenerate(int numBlocks)
throws BitcoinRPCException
BitcoindRpcClientsetGenerate in interface BitcoindRpcClientnumBlocks - is the number of blocks to generateBitcoinRPCExceptionpublic double getEstimateFee(int nBlocks)
throws BitcoinRpcException
getEstimateFee in interface BitcoindRpcClientBitcoinRpcExceptionpublic double getEstimatePriority(int nBlocks)
throws BitcoinRpcException
getEstimatePriority in interface BitcoindRpcClientBitcoinRpcExceptionCopyright © 2015. All rights reserved.