Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.github.jleskovar.btcrpc.websocket.WrappedAsyncWebSocketBtcClient.kt Maven / Gradle / Ivy
package com.github.jleskovar.btcrpc.websocket
import com.github.jleskovar.btcrpc.*
import java.math.BigDecimal
import java.util.concurrent.CompletableFuture
class WrappedAsyncWebSocketBtcClient(
private val username: String,
private val password: String,
private val delegate: AsyncBitcoinRpcClient,
private val jsonWebSocketRpcClient: JsonAsyncWebSocketRpcClient
) : AsyncWebSocketBitcoinRpcClient {
override fun connect() {
jsonWebSocketRpcClient.connect()
// Authenticate as soon as web socket is open (btcd)
delegate.btcdAuthenticate(username, password)
}
override fun disconnect() {
jsonWebSocketRpcClient.disconnect()
}
override fun btcdAuthenticate(username: String, password: String): CompletableFuture {
return delegate.btcdAuthenticate(username, password)
}
override fun btcdGenerate(numberOfBlocks: Int): CompletableFuture> {
return delegate.btcdGenerate(numberOfBlocks)
}
override fun btcdGetBlockWithTransactions(blockHash: String, verbose: Boolean): CompletableFuture {
return delegate.btcdGetBlockWithTransactions(blockHash, verbose)
}
override fun abandonTransaction(transactionId: String): CompletableFuture {
return delegate.abandonTransaction(transactionId)
}
override fun abortRescan(): CompletableFuture {
return delegate.abortRescan()
}
override fun addMultiSigAddress(required: Int?, keys: List): CompletableFuture {
return delegate.addMultiSigAddress(required, keys)
}
override fun addNode(address: String, operation: NodeListOperation): CompletableFuture {
return delegate.addNode(address, operation)
}
override fun backupWallet(destination: String): CompletableFuture {
return delegate.backupWallet(destination)
}
override fun clearBanned(): CompletableFuture {
return delegate.clearBanned()
}
override fun createMultiSig(required: Int, keys: List): CompletableFuture {
return delegate.createMultiSig(required, keys)
}
override fun createRawTransaction(inputs: List, outputs: Map, lockTime: Int?, replaceable: Boolean?): CompletableFuture {
return delegate.createRawTransaction(inputs, outputs, lockTime, replaceable)
}
override fun decodeRawTransaction(transactionId: String): CompletableFuture {
return delegate.decodeRawTransaction(transactionId)
}
override fun decodeScript(scriptHex: String): CompletableFuture {
return delegate.decodeScript(scriptHex)
}
override fun disconnectNode(nodeAddress: String?, nodeId: Int?): CompletableFuture {
return delegate.disconnectNode(nodeAddress, nodeId)
}
override fun dumpPrivateKey(address: String): CompletableFuture {
return delegate.dumpPrivateKey(address)
}
override fun dumpWallet(filename: String): CompletableFuture> {
return delegate.dumpWallet(filename)
}
override fun encryptWallet(passphrase: String): CompletableFuture {
return delegate.encryptWallet(passphrase)
}
override fun generate(numberOfBlocks: Int, maxTries: Int?): CompletableFuture> {
return delegate.generate(numberOfBlocks, maxTries)
}
override fun getAddedNodeInfo(): CompletableFuture> {
return delegate.getAddedNodeInfo()
}
override fun getBalance(account: String, minconf: Int, includeWatchOnly: Boolean): CompletableFuture {
return delegate.getBalance(account, minconf, includeWatchOnly)
}
override fun getBestBlockhash(): CompletableFuture {
return delegate.getBestBlockhash()
}
override fun getBlockData(blockHash: String, verbosity: Int): CompletableFuture {
return delegate.getBlockData(blockHash, verbosity)
}
override fun getBlock(blockHash: String, verbosity: Int): CompletableFuture {
return delegate.getBlock(blockHash, verbosity)
}
override fun getBlockWithTransactions(blockHash: String, verbosity: Int): CompletableFuture {
return delegate.getBlockWithTransactions(blockHash, verbosity)
}
override fun getBlockchainInfo(): CompletableFuture {
return delegate.getBlockchainInfo()
}
override fun getBlockCount(): CompletableFuture {
return delegate.getBlockCount()
}
override fun getBlockHash(height: Int): CompletableFuture {
return delegate.getBlockHash(height)
}
override fun getBlockHeader(blockHash: String, verbose: Boolean?): CompletableFuture {
return delegate.getBlockHeader(blockHash, verbose)
}
override fun getBlockTemplate(blockTemplateRequest: BlockTemplateRequest?): CompletableFuture {
return delegate.getBlockTemplate(blockTemplateRequest)
}
override fun getChainTips(): CompletableFuture> {
return delegate.getChainTips()
}
override fun getChainTransactionStats(blockWindowSize: Int?, blockHashEnd: String?): CompletableFuture {
return delegate.getChainTransactionStats(blockWindowSize, blockHashEnd)
}
override fun getConnectionCount(): CompletableFuture {
return delegate.getConnectionCount()
}
override fun getDifficulty(): CompletableFuture {
return delegate.getDifficulty()
}
override fun getMemoryInfo(): CompletableFuture {
return delegate.getMemoryInfo()
}
override fun getMempoolAncestors(transactionId: String): CompletableFuture {
return delegate.getMempoolAncestors(transactionId)
}
override fun getMempoolDescendants(): CompletableFuture {
return delegate.getMempoolDescendants()
}
override fun getMempoolEntry(transactionId: String): CompletableFuture> {
return delegate.getMempoolEntry(transactionId)
}
override fun getMempoolInfo(): CompletableFuture {
return delegate.getMempoolInfo()
}
override fun getMiningInfo(): CompletableFuture {
return delegate.getMiningInfo()
}
override fun getNetworkTotals(): CompletableFuture {
return delegate.getNetworkTotals()
}
override fun getNetworkHashesPerSeconds(lastBlocks: Int, height: Int): CompletableFuture {
return delegate.getNetworkHashesPerSeconds(lastBlocks, height)
}
override fun getNetworkInfo(): CompletableFuture {
return delegate.getNetworkInfo()
}
override fun getNewAddress(): CompletableFuture {
return delegate.getNewAddress()
}
override fun getPeerInfo(): CompletableFuture> {
return delegate.getPeerInfo()
}
override fun getRawChangeAddress(): CompletableFuture {
return delegate.getRawChangeAddress()
}
override fun getRawMemPool(verbose: Boolean): CompletableFuture>> {
return delegate.getRawMemPool(verbose)
}
override fun getRawTransaction(transactionId: String): CompletableFuture {
return delegate.getRawTransaction(transactionId)
}
override fun getReceivedByAddress(address: String, minConfirmations: Int): CompletableFuture {
return delegate.getReceivedByAddress(address, minConfirmations)
}
override fun getWalletTransaction(transactionId: String): CompletableFuture> {
return delegate.getWalletTransaction(transactionId)
}
override fun getUnspentTransactionOutputInfo(transactionId: String, index: Int): CompletableFuture> {
return delegate.getUnspentTransactionOutputInfo(transactionId, index)
}
override fun getUnspentTransactionOutputSetInfo(): CompletableFuture {
return delegate.getUnspentTransactionOutputSetInfo()
}
override fun getWalletInfo(): CompletableFuture> {
return delegate.getWalletInfo()
}
override fun importAddress(scriptOrAddress: String, label: String?, rescan: Boolean?, includePayToScriptHash: Boolean?): CompletableFuture {
return delegate.importAddress(scriptOrAddress, label, rescan, includePayToScriptHash)
}
override fun importPrivateKey(privateKey: String, label: String?, rescan: Boolean?): CompletableFuture {
return delegate.importPrivateKey(privateKey, label, rescan)
}
override fun importPublicKey(publicKey: String, label: String?, rescan: Boolean?): CompletableFuture {
return delegate.importPublicKey(publicKey, label, rescan)
}
override fun importWallet(walletFile: String): CompletableFuture {
return delegate.importWallet(walletFile)
}
override fun keypoolRefill(newSize: Int): CompletableFuture {
return delegate.keypoolRefill(newSize)
}
override fun listAddressGroupings(): CompletableFuture> {
return delegate.listAddressGroupings()
}
override fun listBanned(): CompletableFuture> {
return delegate.listBanned()
}
override fun listLockUnspent(): CompletableFuture>> {
return delegate.listLockUnspent()
}
override fun listReceivedByAddress(minConfirmations: Int?, includeEmpty: Boolean?, includeWatchOnly: Boolean?): CompletableFuture>> {
return delegate.listReceivedByAddress(minConfirmations, includeEmpty, includeWatchOnly)
}
override fun listSinceBlock(blockHash: String?, targetConfirmations: Int?, includeWatchOnly: Boolean?, includeRemoved: Boolean?): CompletableFuture> {
return delegate.listSinceBlock(blockHash, targetConfirmations, includeWatchOnly, includeRemoved)
}
override fun listTransactions(account: String?, count: Int?, skip: Int?, includeWatchOnly: Boolean?): CompletableFuture>> {
return delegate.listTransactions(account, count, skip, includeWatchOnly)
}
override fun listUnspent(minConfirmations: Int?, maxConfirmations: Int?, addresses: List?, includeUnsafe: Boolean?, queryOptions: QueryOptions?): CompletableFuture {
return delegate.listUnspent(minConfirmations, maxConfirmations, addresses, includeUnsafe, queryOptions)
}
override fun listWallets(): CompletableFuture> {
return delegate.listWallets()
}
override fun lockUnspent(unlock: Boolean, unspentOutputs: List): CompletableFuture {
return delegate.lockUnspent(unlock, unspentOutputs)
}
override fun ping(): CompletableFuture {
return delegate.ping()
}
override fun preciousBlock(block: String): CompletableFuture {
return delegate.preciousBlock(block)
}
override fun prioritiseTransaction(transactionId: String, dummy: Int, feeDeltaSatoshis: Int): CompletableFuture {
return delegate.prioritiseTransaction(transactionId, dummy, feeDeltaSatoshis)
}
override fun pruneBlockchain(blockHeightOrUnixTimestamp: Long): CompletableFuture {
return delegate.pruneBlockchain(blockHeightOrUnixTimestamp)
}
override fun removePrunedFunds(transactionId: String): CompletableFuture {
return delegate.removePrunedFunds(transactionId)
}
override fun sendMany(account: String, addressAmounts: Map, comment: String?, subtractFee: Boolean, replaceable: Boolean, minConfirmations: Int?, feeEstimateMode: FeeEstimateMode?): CompletableFuture {
return delegate.sendMany(account, addressAmounts, comment, subtractFee, replaceable, minConfirmations, feeEstimateMode)
}
override fun sendRawTransaction(transaction: String): CompletableFuture {
return delegate.sendRawTransaction(transaction)
}
override fun sendToAddress(address: String, amount: BigDecimal, comment: String?, commentTo: String?, subtractFee: Boolean?, replaceable: Boolean?, minConfirmations: Int?, feeEstimateMode: FeeEstimateMode?): CompletableFuture {
return delegate.sendToAddress(address, amount, comment, commentTo, subtractFee, replaceable, minConfirmations, feeEstimateMode)
}
override fun setBan(address: String, operation: NodeListOperation, seconds: Int): CompletableFuture {
return delegate.setBan(address, operation, seconds)
}
override fun setTransactionFee(fee: Double): CompletableFuture {
return delegate.setTransactionFee(fee)
}
override fun signMessage(address: String, message: String): CompletableFuture {
return delegate.signMessage(address, message)
}
override fun signMessageWithPrivateKey(privateKey: String, message: String): CompletableFuture {
return delegate.signMessageWithPrivateKey(privateKey, message)
}
override fun signRawTransaction(transactionId: String): CompletableFuture {
return delegate.signRawTransaction(transactionId)
}
override fun submitBlock(blockData: String): CompletableFuture {
return delegate.submitBlock(blockData)
}
override fun uptime(): CompletableFuture {
return delegate.uptime()
}
override fun validateAddress(address: String): CompletableFuture {
return delegate.validateAddress(address)
}
override fun verifyChain(): CompletableFuture {
return delegate.verifyChain()
}
override fun verifyMessage(address: String, signature: String, message: String): CompletableFuture {
return delegate.verifyMessage(address, signature, message)
}
override fun searchRawSerialisedTransactions(address: String, verbose: Int?, skip: Int?, count: Int?, vInExtra: Int?, reverse: Boolean?): CompletableFuture> {
return delegate.searchRawSerialisedTransactions(address, verbose, skip, count, vInExtra, reverse)
}
override fun searchRawVerboseTransactions(address: String, verbose: Int?, skip: Int?, count: Int?, vInExtra: Int?, reverse: Boolean?): CompletableFuture> {
return delegate.searchRawVerboseTransactions(address, verbose, skip, count, vInExtra, reverse)
}
}