
com.github.jleskovar.btcrpc.BitcoinRpcClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of btc-rpc-client Show documentation
Show all versions of btc-rpc-client Show documentation
Kotlin-based JSON-RPC client for bitcoind/btcd
The newest version!
package com.github.jleskovar.btcrpc
import com.googlecode.jsonrpc4j.JsonRpcMethod
import java.math.BigDecimal
/**
* Created by james on 1/12/17.
*/
interface BitcoinRpcClient {
@JsonRpcMethod("abandontransaction")
fun abandonTransaction(transactionId: String)
@JsonRpcMethod("abortrescan")
fun abortRescan()
@JsonRpcMethod("addmultisigaddress")
fun addMultiSigAddress(required: Int? = null, keys: List): String
@JsonRpcMethod("addnode")
fun addNode(address: String, operation: NodeListOperation)
@JsonRpcMethod("backupwallet")
fun backupWallet(destination: String)
@JsonRpcMethod("clearbanned")
fun clearBanned()
@JsonRpcMethod("createmultisig")
fun createMultiSig(required: Int, keys: List): MultiSigAddress
@JsonRpcMethod("createrawtransaction")
fun createRawTransaction(
inputs: List,
outputs: Map,
lockTime: Int? = null,
replaceable: Boolean? = null
): String
@JsonRpcMethod("decoderawtransaction")
fun decodeRawTransaction(transactionId: String): Transaction
@JsonRpcMethod("decodescript")
fun decodeScript(scriptHex: String): DecodedScript
@JsonRpcMethod("disconnectnode")
fun disconnectNode(nodeAddress: String? = null, nodeId: Int? = null)
@JsonRpcMethod("dumpprivkey")
fun dumpPrivateKey(address: String): String
@JsonRpcMethod("dumpwallet")
fun dumpWallet(filename: String): Map<*, *>
@JsonRpcMethod("encryptwallet")
fun encryptWallet(passphrase: String)
@JsonRpcMethod("generate")
fun generate(numberOfBlocks: Int, maxTries: Int? = null): List
@JsonRpcMethod("getaddednodeinfo")
fun getAddedNodeInfo(): List
@JsonRpcMethod("getbalance")
fun getBalance(
account: String = "*",
minconf: Int = 1,
includeWatchOnly: Boolean = false): BigDecimal
@JsonRpcMethod("getbestblockhash")
fun getBestBlockhash(): String
@JsonRpcMethod("getblock")
fun getBlockData(blockHash: String, verbosity: Int = 0): String
@JsonRpcMethod("getblock")
fun getBlock(blockHash: String, verbosity: Int = 1): BlockInfo
@JsonRpcMethod("getblock")
fun getBlockWithTransactions(blockHash: String, verbosity: Int = 2): BlockInfoWithTransactions
@JsonRpcMethod("getblockchaininfo")
fun getBlockchainInfo(): BlockChainInfo
@JsonRpcMethod("getblockcount")
fun getBlockCount(): Int
@JsonRpcMethod("getblockhash")
fun getBlockHash(height: Int): String
@JsonRpcMethod("getblockheader")
fun getBlockHeader(blockHash: String, verbose: Boolean? = false): Any
@JsonRpcMethod("getblocktemplate")
fun getBlockTemplate(blockTemplateRequest: BlockTemplateRequest? = null)
@JsonRpcMethod("getchaintips")
fun getChainTips(): List
@JsonRpcMethod("getchaintxstats")
fun getChainTransactionStats(
blockWindowSize: Int? = null,
blockHashEnd: String? = null
): ChainTransactionStats
@JsonRpcMethod("getconnectioncount")
fun getConnectionCount(): Int
@JsonRpcMethod("getdifficulty")
fun getDifficulty(): BigDecimal
@JsonRpcMethod("getmemoryinfo")
fun getMemoryInfo(): Any
@JsonRpcMethod("getmempoolancestors")
fun getMempoolAncestors(transactionId: String): Any
@JsonRpcMethod("getmempooldescendants")
fun getMempoolDescendants(): Any
@JsonRpcMethod("getmempoolentry")
fun getMempoolEntry(transactionId: String): Map<*, *>
@JsonRpcMethod("getmempoolinfo")
fun getMempoolInfo(): MemPoolInfo
@JsonRpcMethod("getmininginfo")
fun getMiningInfo(): MiningInfo
@JsonRpcMethod("getnettotals")
fun getNetworkTotals(): NetworkTotals
@JsonRpcMethod("getnetworkhashps")
fun getNetworkHashesPerSeconds(lastBlocks: Int, height: Int): Long
@JsonRpcMethod("getnetworkinfo")
fun getNetworkInfo(): NetworkInfo
@JsonRpcMethod("getnewaddress")
fun getNewAddress(): String
@JsonRpcMethod("getpeerinfo")
fun getPeerInfo(): List
@JsonRpcMethod("getrawchangeaddress")
fun getRawChangeAddress(): String
@JsonRpcMethod("getrawmempool")
fun getRawMemPool(verbose: Boolean = false): List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy