diff --git a/DESCRIPTION b/DESCRIPTION index d9389b5..27e8aae 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,15 +1,15 @@ Package: rbtc Title: Bitcoin API -Version: 0.1-3 +Version: 0.1-4 Authors@R: person("Bernhard", "Pfaff", email = "bernhard@pfaffikus.de", role = c("aut", "cre")) Description: Implementation of the RPC-JSON API for Bitcoin and utility functions for address creation. Depends: R (>= 3.4.0) License: GPL-3 Encoding: UTF-8 LazyData: true -RoxygenNote: 6.0.1 +RoxygenNote: 6.1.0 Imports: methods, rjson, httr, openssl, gmp NeedsCompilation: no -Packaged: 2018-08-14 14:50:15 UTC; pfaffb +Packaged: 2018-09-03 15:51:24 UTC; pfaffb Author: Bernhard Pfaff [aut, cre] Maintainer: Bernhard Pfaff diff --git a/NAMESPACE b/NAMESPACE index 4769936..99e23e7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,6 +8,8 @@ export(Wif2PrivKey) export(addnode) export(base58CheckDecode) export(base58CheckEncode) +export(blockattime) +export(blockstats) export(clearbanned) export(concatHex) export(conrpc) @@ -17,6 +19,7 @@ export(createPrivateKey) export(date2int) export(decodeHex) export(decoderawtransaction) +export(decodescript) export(disconnectnode) export(doubleUp) export(ecparam) @@ -63,6 +66,13 @@ export(rpcpost) export(setnetworkactive) export(startbtc) export(stopbtc) +export(timeofblock) +export(txfee) +export(txids) +export(txinids) +export(txstats) +export(utxoage) +export(utxovalue) export(validBtcAdr) export(verifychain) export(verifytxoutproof) diff --git a/R/BlockchainRpcs.R b/R/BlockchainRpcs.R index 23d6902..6e0a907 100644 --- a/R/BlockchainRpcs.R +++ b/R/BlockchainRpcs.R @@ -1,8 +1,8 @@ #' RPC-JSON API: getblockchaininfo -#' +#' #' Returns an object containing various state info regarding blockchain processing. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -10,17 +10,17 @@ #' @references \url{https://bitcoin.org/en/developer-reference#getblockchaininfo}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getblockchaininfo -#' @aliases getblockchaininfo +#' @aliases getblockchaininfo #' @rdname getblockchaininfo #' @export -getblockchaininfo <- function(obj){ - rpcpost(obj, "getblockchaininfo") +getblockchaininfo <- function(con){ + rpcpost(con, "getblockchaininfo") } #' RPC-JSON API: getbestblockhash -#' +#' #' Returns the hash of the best (tip) block in the longest blockchain. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -28,14 +28,14 @@ getblockchaininfo <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#getbestblockhash}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getbestblockhash -#' @aliases getbestblockhash +#' @aliases getbestblockhash #' @rdname getbestblockhash #' @export -getbestblockhash <- function(obj){ - rpcpost(obj, "getbestblockhash") +getbestblockhash <- function(con){ + rpcpost(con, "getbestblockhash") } #' RPC-JSON API: getblock -#' +#' #' Returns information of a block hash. The returned level of details depends on the #' argument \code{verbosity}. #' @@ -44,11 +44,11 @@ getbestblockhash <- function(obj){ #' hex-encoded data for block 'hash'. #' If verbosity is 'l1' (the default), returns an object with information about block . #' If verbosity is 'l2', returns an object with information about block and -#' information about each transaction. +#' information about each transaction. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' @param blockhash \code{character}, the block hash. -#' @param verbosity \code{character}, level of returned details. +#' @param verbosity \code{character}, level of returned details. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -56,10 +56,10 @@ getbestblockhash <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#getblock}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getblock -#' @aliases getblock +#' @aliases getblock #' @rdname getblock #' @export -getblock <- function(obj, blockhash, verbosity = c("l1", "l0", "l2")){ +getblock <- function(con, blockhash, verbosity = c("l1", "l0", "l2")){ bh <- as.character(blockhash) verbosity <- match.arg(verbosity) verb <- switch(verbosity, @@ -67,13 +67,13 @@ getblock <- function(obj, blockhash, verbosity = c("l1", "l0", "l2")){ l1 = 1L, l2 = 2L) pl <- list(blockhash = bh, verbosity = verb) - rpcpost(obj, "getblock", pl) + rpcpost(con, "getblock", pl) } #' RPC-JSON API: getblockcount -#' +#' #' Returns the number of blocks in the longest blockchain. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -81,17 +81,17 @@ getblock <- function(obj, blockhash, verbosity = c("l1", "l0", "l2")){ #' @references \url{https://bitcoin.org/en/developer-reference#getblockcount}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getblockcount -#' @aliases getblockcount +#' @aliases getblockcount #' @rdname getblockcount #' @export -getblockcount <- function(obj){ - rpcpost(obj, "getblockcount") +getblockcount <- function(con){ + rpcpost(con, "getblockcount") } #' RPC-JSON API: getblockhash -#' +#' #' Returns hash of block in best-block-chain at height provided. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' @param height \code{integer} the height index. #' #' @return A S4-object of class \code{ANSRPC}. @@ -100,19 +100,19 @@ getblockcount <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#getblockhash}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getblockhash -#' @aliases getblockhash +#' @aliases getblockhash #' @rdname getblockhash #' @export -getblockhash <- function(obj, height){ +getblockhash <- function(con, height){ h <- as.integer(height) - rpcpost(obj, "getblockhash", list(height = h)) + rpcpost(con, "getblockhash", list(height = h)) } #' RPC-JSON API: getchaintips -#' +#' #' Return information about all known tips in the block tree, #' including the main chain as well as orphaned branches. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -120,17 +120,17 @@ getblockhash <- function(obj, height){ #' @references \url{https://bitcoin.org/en/developer-reference#getchaintips}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getchaintips -#' @aliases getchaintips +#' @aliases getchaintips #' @rdname getchaintips #' @export -getchaintips <- function(obj){ - rpcpost(obj, "getchaintips") +getchaintips <- function(con){ + rpcpost(con, "getchaintips") } #' RPC-JSON API: getdifficulty -#' +#' #' Returns the proof-of-work difficulty as a multiple of the minimum difficulty. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -138,17 +138,17 @@ getchaintips <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#getdifficulty}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getdifficulty -#' @aliases getdifficulty +#' @aliases getdifficulty #' @rdname getdifficulty #' @export -getdifficulty <- function(obj){ - rpcpost(obj, "getdifficulty") +getdifficulty <- function(con){ + rpcpost(con, "getdifficulty") } #' RPC-JSON API: getmempoolinfo -#' +#' #' Returns details on the active state of the TX memory pool. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -156,18 +156,18 @@ getdifficulty <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#getmempoolinfo}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getmempoolinfo -#' @aliases getmempoolinfo +#' @aliases getmempoolinfo #' @rdname getmempoolinfo #' @export -getmempoolinfo <- function(obj){ - rpcpost(obj, "getmempoolinfo") +getmempoolinfo <- function(con){ + rpcpost(con, "getmempoolinfo") } #' RPC-JSON API: gettxoutsetinfo -#' +#' #' Returns statistics about the unspent transaction output set. #' Note this call may take some time. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs @@ -175,17 +175,17 @@ getmempoolinfo <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#gettxoutsetinfo}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name gettxoutsetinfo -#' @aliases gettxoutsetinfo +#' @aliases gettxoutsetinfo #' @rdname gettxoutsetinfo #' @export -gettxoutsetinfo <- function(obj){ - rpcpost(obj, "gettxoutsetinfo") +gettxoutsetinfo <- function(con){ + rpcpost(con, "gettxoutsetinfo") } #' RPC-JSON API: pruneblockchain -#' -#' Pruning of blockchain. #' -#' @param obj object of class \code{CONRPC}. +#' Pruning of blockchain. +#' +#' @param con object of class \code{CONRPC}. #' @param height \code{integer} The block height to prune up to. #' #' @section Details: @@ -198,18 +198,18 @@ gettxoutsetinfo <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#pruneblockchain}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name pruneblockchain -#' @aliases pruneblockchain +#' @aliases pruneblockchain #' @rdname pruneblockchain #' @export -pruneblockchain <- function(obj, height){ - rpcpost(obj, "pruneblockchain", +pruneblockchain <- function(con, height){ + rpcpost(con, "pruneblockchain", list(height = height)) } #' RPC-JSON API: getblockheader -#' -#' Returns the block header for a given hash string. #' -#' @param obj object of class \code{CONRPC}. +#' Returns the block header for a given hash string. +#' +#' @param con object of class \code{CONRPC}. #' @param hash \code{character} the block hash. #' @param verbose \code{logical} \code{TRUE} for a json object, #' \code{FALSE} for the hex encoded data. @@ -225,21 +225,21 @@ pruneblockchain <- function(obj, height){ #' @references \url{https://bitcoin.org/en/developer-reference#getblockheader}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getblockheader -#' @aliases getblockheader +#' @aliases getblockheader #' @rdname getblockheader #' @export -getblockheader <- function(obj, hash, verbose = TRUE){ +getblockheader <- function(con, hash, verbose = TRUE){ hash <- as.character(hash) verbose <- as.logical(verbose) - rpcpost(obj, "getblockheader", + rpcpost(con, "getblockheader", list(hash, verbose)) } #' RPC-JSON API: getchaintxstats #' #' Compute statistics about the total number and #' rate of transactions in the chain. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param nblocks \code{integer} optional, size of the window in #' number of blocks (default: one month). #' @param blockhash \code{character} optional, the hash of the block @@ -251,29 +251,29 @@ getblockheader <- function(obj, hash, verbose = TRUE){ #' @references \url{https://bitcoin.org/en/developer-reference#getchaintxstats}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getchaintxstats -#' @aliases getchaintxstats +#' @aliases getchaintxstats #' @rdname getchaintxstats #' @export -getchaintxstats <- function(obj, nblocks = NULL, blockhash = NULL){ +getchaintxstats <- function(con, nblocks = NULL, blockhash = NULL){ if (!is.null(nblocks)){ p <- as.integer(nblocks) - rpcpost(obj, "getchaintxstats", + rpcpost(con, "getchaintxstats", list(nblocks = p)) } else if (!is.null(blockhash)){ p <- as.character(blockhash) - rpcpost(obj, "getchaintxstats", + rpcpost(con, "getchaintxstats", list(blockhash = p)) } else { - rpcpost(obj, "getchaintxstats") + rpcpost(con, "getchaintxstats") } } #' RPC-JSON API: preciousblock #' #' Treats a block as if it were received before others with the same work. #' A can override the effect of an earlier one. The effects of preciousblock -#' are not retained across restarts. -#' -#' @param obj object of class \code{CONRPC}. +#' are not retained across restarts. +#' +#' @param con object of class \code{CONRPC}. #' @param blockhash \code{character}, the hash of the block to mark as precious. #' #' @return A S4-object of class \code{ANSRPC}. @@ -282,19 +282,19 @@ getchaintxstats <- function(obj, nblocks = NULL, blockhash = NULL){ #' @references \url{https://bitcoin.org/en/developer-reference#preciousblock}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name preciousblock -#' @aliases preciousblock +#' @aliases preciousblock #' @rdname preciousblock #' @export -preciousblock <- function(obj, blockhash){ +preciousblock <- function(con, blockhash){ bh <- as.character(blockhash) - rpcpost(obj, "preciousblock", + rpcpost(con, "preciousblock", list("blockhash" = bh)) } #' RPC-JSON API: getmempoolentry #' #' Returns mempool data for given transaction. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param txid \code{character}, the transaction id (must be in mempool). #' #' @return A S4-object of class \code{ANSRPC}. @@ -303,23 +303,23 @@ preciousblock <- function(obj, blockhash){ #' @references \url{https://bitcoin.org/en/developer-reference#getmempoolentry}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getmempoolentry -#' @aliases getmempoolentry +#' @aliases getmempoolentry #' @rdname getmempoolentry #' @export -getmempoolentry <- function(obj, txid){ +getmempoolentry <- function(con, txid){ txid <- as.character(txid) - rpcpost(obj, "getmempoolentry", + rpcpost(con, "getmempoolentry", list(txid)) } #' RPC-JSON API: getmempoolancestors #' #' If txid is in the mempool, returns all in-mempool ancestors. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param txid \code{character}, the transaction id (must be in mempool). #' @param verbose \code{logical}, \code{TrueTRUE} for a json object, #' \code{FALSE} for array of transaction ids (default). -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs #' @author Bernhard Pfaff @@ -329,21 +329,21 @@ getmempoolentry <- function(obj, txid){ #' @aliases getmempoolancestors #' @rdname getmempoolancestors #' @export -getmempoolancestors <- function(obj, txid, verbose = FALSE){ +getmempoolancestors <- function(con, txid, verbose = FALSE){ txid <- as.character(txid) - rpcpost(obj, "getmempoolancestors", + rpcpost(con, "getmempoolancestors", list(txid = txid, verbose = verbose)) } #' RPC-JSON API: getmempooldescendants #' #' If txid is in the mempool, returns all in-mempool descendants. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param txid \code{character}, the transaction id (must be in mempool). #' @param verbose \code{logical}, \code{TrueTRUE} for a json object, #' \code{FALSE} for array of transaction ids (default). -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs #' @author Bernhard Pfaff @@ -353,9 +353,9 @@ getmempoolancestors <- function(obj, txid, verbose = FALSE){ #' @aliases getmempooldescendants #' @rdname getmempooldescendants #' @export -getmempooldescendants <- function(obj, txid, verbose = FALSE){ +getmempooldescendants <- function(con, txid, verbose = FALSE){ txid <- as.character(txid) - rpcpost(obj, "getmempooldescendants", + rpcpost(con, "getmempooldescendants", list(txid = txid, verbose = verbose)) } @@ -365,11 +365,11 @@ getmempooldescendants <- function(obj, txid, verbose = FALSE){ #' of string transaction ids. #' Hint: use getmempoolentry to fetch a specific transaction #' from the mempool. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param verbose \code{logical}, \code{TRUE} for a json object, #' \code{FALSE} for array of transaction ids -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs #' @author Bernhard Pfaff @@ -379,22 +379,22 @@ getmempooldescendants <- function(obj, txid, verbose = FALSE){ #' @aliases getrawmempool #' @rdname getrawmempool #' @export -getrawmempool <- function(obj, verbose = TRUE){ - rpcpost(obj, "getrawmempool", +getrawmempool <- function(con, verbose = TRUE){ + rpcpost(con, "getrawmempool", list(verbose)) } #' RPC-JSON API: gettxout #' #' Returns details about an unspent transaction output. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param txid \code{charcater} the transaction id. #' @param n \code{integer} vout number. #' @param incmempool \code{logical} whether to include the mempool (default \code{TRUE}). #' #' @details #' Note that an unspent output that is spent in the mempool won't appear. -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs #' @author Bernhard Pfaff @@ -404,11 +404,11 @@ getrawmempool <- function(obj, verbose = TRUE){ #' @aliases gettxout #' @rdname gettxout #' @export -gettxout <- function(obj, txid, n, incmempool = TRUE){ +gettxout <- function(con, txid, n, incmempool = TRUE){ txid <- as.character(txid) n <- as.integer(n) incmempool <- as.logical(incmempool) - rpcpost(obj, "gettxout", + rpcpost(con, "gettxout", list(txid = txid, n = n, include_mempool = incmempool)) @@ -416,8 +416,8 @@ gettxout <- function(obj, txid, n, incmempool = TRUE){ #' RPC-JSON API: gettxoutproof #' #' Returns a hex-encoded proof that "txid" was included in a block. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param txids \code{charcater} a json array of txids to filter. #' @param blockhash \code{integer} looks for txid in the block with this hash, #' (optional, default \code{NULL}). @@ -428,7 +428,7 @@ gettxout <- function(obj, txid, n, incmempool = TRUE){ #' you need to maintain a transaction index, using the -txindex command line #' option or specify the block in which the transaction is included manually #' (by blockhash). -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs #' @author Bernhard Pfaff @@ -438,15 +438,15 @@ gettxout <- function(obj, txid, n, incmempool = TRUE){ #' @aliases gettxoutproof #' @rdname gettxoutproof #' @export -gettxoutproof <- function(obj, txids, blockhash = NULL){ +gettxoutproof <- function(con, txids, blockhash = NULL){ txids <- as.character(txids) txids <- matrix(txids, ncol = 1) if (is.null(blockhash)){ - ans <- rpcpost(obj, "gettxoutproof", + ans <- rpcpost(con, "gettxoutproof", list(txids = as.list(txids))) } else { bh <- as.integer(blockhash) - ans <- rpcpost(obj, "gettxoutproof", + ans <- rpcpost(con, "gettxoutproof", list(txids = as.list(txids), blockhash = bh)) } @@ -455,13 +455,13 @@ gettxoutproof <- function(obj, txids, blockhash = NULL){ #' RPC-JSON API: verifychain #' #' Verifies blockchain database. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param checklevel \code{integer} (optional, 0-4, default=3), #' how thorough the block verification is.a json array of txids to filter. #' @param nblocks \code{integer} (optional, default=6, 0=all), #' the number of blocks to check. -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs #' @author Bernhard Pfaff @@ -471,22 +471,22 @@ gettxoutproof <- function(obj, txids, blockhash = NULL){ #' @aliases verifychain #' @rdname verifychain #' @export -verifychain <- function(obj, checklevel = NULL, nblocks = NULL){ +verifychain <- function(con, checklevel = NULL, nblocks = NULL){ if (!is.null(checklevel) && is.null(nblocks)){ - ans <- rpcpost(obj, "verifychain", + ans <- rpcpost(con, "verifychain", list(checklevel = checklevel)) } if (is.null(checklevel) && !is.null(nblocks)){ - ans <- rpcpost(obj, "verifychain", + ans <- rpcpost(con, "verifychain", list(nblocks = nblocks)) } if (!is.null(checklevel) && !is.null(nblocks)){ - ans <- rpcpost(obj, "verifychain", + ans <- rpcpost(con, "verifychain", list(checklevel = checklevel, nblocks = nblocks)) } if (is.null(checklevel) && is.null(nblocks)){ - ans <- rpcpost(obj, "verifychain", + ans <- rpcpost(con, "verifychain", list()) } ans @@ -496,11 +496,11 @@ verifychain <- function(obj, checklevel = NULL, nblocks = NULL){ #' Verifies that a proof points to a transaction in a block, #' returning the transaction it commits to and throwing an #' RPC error if the block is not in our best chain. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param proof \code{character} the hex-encoded proof generated #' by gettxoutproof. -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Blockchain RPCs #' @author Bernhard Pfaff @@ -510,8 +510,29 @@ verifychain <- function(obj, checklevel = NULL, nblocks = NULL){ #' @aliases verifytxoutproof #' @rdname verifytxoutproof #' @export -verifytxoutproof <- function(obj, proof){ +verifytxoutproof <- function(con, proof){ proof <- as.character(proof) - rpcpost(obj, "verifytxoutproof", + rpcpost(con, "verifytxoutproof", list(proof)) } +#' RPC-JSON API: decodescript +#' +#' The decodescript RPC decodes a hex-encoded P2SH redeem script. +#' +#' @param con object of class \code{CONRPC}. +#' @param redeem \code{character}, the P2SH. +#' +#' @return A S4-object of class \code{ANSRPC}. +#' @family Blockchain RPCs +#' @author Bernhard Pfaff +#' @references \url{https://bitcoin.org/en/developer-reference#decodescript}, +#' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +#' @name decodescript +#' @aliases decodescript +#' @rdname decodescript +#' @export +decodescript <- function(con, redeem){ + rs <- as.character(redeem) + pl <- list(redeem = rs) + rpcpost(con, "decodescript", pl) +} diff --git a/R/ControlRpcs.R b/R/ControlRpcs.R index 207f101..34bdbc9 100644 --- a/R/ControlRpcs.R +++ b/R/ControlRpcs.R @@ -6,7 +6,7 @@ #' Projects should transition to using getblockchaininfo, getnetworkinfo, and #' getwalletinfo before upgrading to 0.16. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Control RPCs @@ -14,17 +14,17 @@ #' @references \url{https://bitcoin.org/en/developer-reference#getinfo}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getinfo -#' @aliases getinfo +#' @aliases getinfo #' @rdname getinfo #' @export -getinfo <- function(obj){ - rpcpost(obj, "getinfo") +getinfo <- function(con){ + rpcpost(con, "getinfo") } #' RPC-JSON API: Help #' #' Returning information about RPC functions. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' @param rpc \code{character}, name of RPC function. #' #' @return A S4-object of class \code{ANSRPC}. @@ -33,17 +33,17 @@ getinfo <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#help}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name gethelp -#' @aliases gethelp +#' @aliases gethelp #' @rdname gethelp #' @export -gethelp <- function(obj, rpc = ""){ - rpcpost(obj, "help", list(command = rpc)) +gethelp <- function(con, rpc = ""){ + rpcpost(con, "help", list(command = rpc)) } #' RPC-JSON API: getwalletinfo #' #' Returning information about bitcoin wallet. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Control RPCs @@ -51,9 +51,9 @@ gethelp <- function(obj, rpc = ""){ #' @references \url{https://bitcoin.org/en/developer-reference#getwalletinfo}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getwalletinfo -#' @aliases getwalletinfo +#' @aliases getwalletinfo #' @rdname getwalletinfo #' @export -getwalletinfo <- function(obj){ - rpcpost(obj, "getwalletinfo") +getwalletinfo <- function(con){ + rpcpost(con, "getwalletinfo") } diff --git a/R/ImpPack.R b/R/ImpPack.R deleted file mode 100644 index 49377f4..0000000 --- a/R/ImpPack.R +++ /dev/null @@ -1,6 +0,0 @@ -#' @import methods -NULL -#' @import rjson -NULL -#' @import httr -NULL diff --git a/R/NetworkRpcs.R b/R/NetworkRpcs.R index 2930938..46a3ed8 100644 --- a/R/NetworkRpcs.R +++ b/R/NetworkRpcs.R @@ -1,8 +1,8 @@ #' RPC-JSON API: getpeerinfo -#' +#' #' Returns data about each connected network node as a json array of objects. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs @@ -10,17 +10,17 @@ #' @references \url{https://bitcoin.org/en/developer-reference#getpeerinfo}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getpeerinfo -#' @aliases getpeerinfo +#' @aliases getpeerinfo #' @rdname getpeerinfo #' @export -getpeerinfo <- function(obj){ - rpcpost(obj, "getpeerinfo") +getpeerinfo <- function(con){ + rpcpost(con, "getpeerinfo") } #' RPC-JSON API: getnetworkinfo -#' +#' #' Returns an object containing various state info regarding P2P networking. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs @@ -28,20 +28,20 @@ getpeerinfo <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#getnetworkinfo}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getnetworkinfo -#' @aliases getnetworkinfo +#' @aliases getnetworkinfo #' @rdname getnetworkinfo #' @export -getnetworkinfo <- function(obj){ - rpcpost(obj, "getnetworkinfo") +getnetworkinfo <- function(con){ + rpcpost(con, "getnetworkinfo") } #' RPC-JSON API: ping -#' +#' #' Requests that a ping be sent to all other nodes, to measure ping time. #' Results provided in getpeerinfo, pingtime and pingwait fields are #' decimal seconds. Ping command is handled in queue with all other commands, #' so it measures processing backlog, not just network ping. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs @@ -49,18 +49,18 @@ getnetworkinfo <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#ping}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name ping -#' @aliases ping +#' @aliases ping #' @rdname ping #' @export -ping <- function(obj){ - rpcpost(obj, "ping") +ping <- function(con){ + rpcpost(con, "ping") } #' RPC-JSON API: getnettotals -#' +#' #' Returns information about network traffic, including bytes in, #' bytes out, and current time. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs @@ -68,17 +68,17 @@ ping <- function(obj){ #' @references \url{https://bitcoin.org/en/developer-reference#getnettotals}, #' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} #' @name getnettotals -#' @aliases getnettotals +#' @aliases getnettotals #' @rdname getnettotals #' @export -getnettotals <- function(obj){ - rpcpost(obj, "getnettotals") +getnettotals <- function(con){ + rpcpost(con, "getnettotals") } #' RPC-JSON API: getconnectioncount -#' +#' #' Returns the number of connections to other nodes. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs @@ -90,16 +90,16 @@ getnettotals <- function(obj){ #' @aliases getconnectioncount #' @rdname getconnectioncount #' @export -getconnectioncount <- function(obj){ - rpcpost(obj, "getconnectioncount") +getconnectioncount <- function(con){ + rpcpost(con, "getconnectioncount") } #' RPC-JSON API: setnetworkactive -#' +#' #' Disable/enable all p2p network activity. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param state \code{logical} the network state. -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs #' @author Bernhard Pfaff @@ -110,15 +110,15 @@ getconnectioncount <- function(obj){ #' @aliases setnetworkactive #' @rdname setnetworkactive #' @export -setnetworkactive <- function(obj, state = TRUE){ +setnetworkactive <- function(con, state = TRUE){ pl <- list(state = state) - rpcpost(obj, "setnetworkactive", pl) + rpcpost(con, "setnetworkactive", pl) } #' RPC-JSON API: listbanned -#' +#' #' List all banned IPs/Subnets. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs @@ -130,20 +130,20 @@ setnetworkactive <- function(obj, state = TRUE){ #' @aliases listbanned #' @rdname listbanned #' @export -listbanned <- function(obj){ - rpcpost(obj, "listbanned") +listbanned <- function(con){ + rpcpost(con, "listbanned") } #' RPC-JSON API: addnode -#' +#' #' Attempts to add or remove a node from the addnode list. #' Or try a connection to a node once. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param node \code{character} the node (see \code{getpeerinfo()} for nodes). #' @param command \code{character} 'add' to add a node to the list, #' 'remove' to remove a node from the list, 'onetry' to try a connection #' to the node once. -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs #' @author Bernhard Pfaff @@ -154,17 +154,17 @@ listbanned <- function(obj){ #' @aliases addnode #' @rdname addnode #' @export -addnode <- function(obj, node, command = c("add", "remove", "onetry")){ +addnode <- function(con, node, command = c("add", "remove", "onetry")){ node <- as.character(node) command <- match.arg(command) pl <- list(node = node, command = command) - rpcpost(obj, "addnode", pl) + rpcpost(con, "addnode", pl) } #' RPC-JSON API: clearbanned -#' +#' #' Clear all banned IPs. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs @@ -176,19 +176,19 @@ addnode <- function(obj, node, command = c("add", "remove", "onetry")){ #' @aliases clearbanned #' @rdname clearbanned #' @export -clearbanned <- function(obj){ - rpcpost(obj, "clearbanned") +clearbanned <- function(con){ + rpcpost(con, "clearbanned") } #' RPC-JSON API: getaddednodeinfo #' #' Returns information about the given added node, #' or all added nodes (note that onetry addnodes #' are not listed here) -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param node \code{character} the node (see \code{getpeerinfo()} #' for nodes). -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs #' @author Bernhard Pfaff @@ -199,13 +199,13 @@ clearbanned <- function(obj){ #' @aliases getaddednodeinfo #' @rdname getaddednodeinfo #' @export -getaddednodeinfo <- function(obj, node = NULL){ +getaddednodeinfo <- function(con, node = NULL){ if (is.null(node)){ - return(rpcpost(obj, "getaddednodeinfo")) + return(rpcpost(con, "getaddednodeinfo")) } else { node <- as.character(node)[1] pl <- list(node = node) - return(rpcpost(obj, "getaddednodeinfo", pl)) + return(rpcpost(con, "getaddednodeinfo", pl)) } } #' RPC-JSON API: disconnectnode @@ -213,13 +213,13 @@ getaddednodeinfo <- function(obj, node = NULL){ #' Immediately disconnects from the specified peer node. #' Strictly one out of \code{address} and \code{nodeid} can be #' provided to identify the node. -#' -#' @param obj object of class \code{CONRPC}. +#' +#' @param con object of class \code{CONRPC}. #' @param address \code{character} the IP address/port #' of the node. #' @param nodeid \code{character} The node ID #' (see \code{getpeerinfo()} for node IDs). -#' +#' #' @return A S4-object of class \code{ANSRPC}. #' @family Network RPCs #' @author Bernhard Pfaff @@ -230,7 +230,7 @@ getaddednodeinfo <- function(obj, node = NULL){ #' @aliases disconnectnode #' @rdname disconnectnode #' @export -disconnectnode <- function(obj, address = NULL, nodeid = NULL){ +disconnectnode <- function(con, address = NULL, nodeid = NULL){ if (is.null(address) & is.null(nodeid)){ stop("Either 'address' or 'nodeid' must be provided.\n") } @@ -247,5 +247,5 @@ disconnectnode <- function(obj, address = NULL, nodeid = NULL){ address <- as.character(address) pl <- list(address = address) } - rpcpost(obj, "disconnectnode", pl) + rpcpost(con, "disconnectnode", pl) } diff --git a/R/RawTransactions.R b/R/RawTransactions.R index 8291e4c..257fd60 100644 --- a/R/RawTransactions.R +++ b/R/RawTransactions.R @@ -1,5 +1,5 @@ #' RPC-JSON API: getrawtransaction -#' +#' #' Returns the raw transaction data. #' #' @section: Details @@ -10,9 +10,9 @@ #' If verbose is 'false' or omitted, returns a string that is serialized, #' hex-encoded data for 'txid'. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' @param txid \code{character}, the transaction id. -#' @param verbose \code{logical}, type of output. +#' @param verbose \code{logical}, type of output. #' #' @return A S4-object of class \code{ANSRPC}. #' @family RawTransactions RPCs @@ -23,21 +23,18 @@ #' @aliases getrawtransaction #' @rdname getrawtransaction #' @export -getrawtransaction <- function(obj, txid, verbose = FALSE){ +getrawtransaction <- function(con, txid, verbose = FALSE){ txid <- as.character(txid) verb <- ifelse(verbose, 1L, 0L) pl <- list(txid = txid, verbose = verb) - rpcpost(obj, "getrawtransaction", pl) + rpcpost(con, "getrawtransaction", pl) } - - - #' RPC-JSON API: decoderawtransaction -#' +#' #' Return a JSON object representing the serialized, #' hex-encoded transaction. #' -#' @param obj object of class \code{CONRPC}. +#' @param con object of class \code{CONRPC}. #' @param hexstring \code{character}, the transaction hex string. #' #' @return A S4-object of class \code{ANSRPC}. @@ -49,8 +46,8 @@ getrawtransaction <- function(obj, txid, verbose = FALSE){ #' @aliases decoderawtransaction #' @rdname decoderawtransaction #' @export -decoderawtransaction <- function(obj, hexstring){ +decoderawtransaction <- function(con, hexstring){ hexstring <- as.character(hexstring) pl <- list(hexstring = hexstring) - rpcpost(obj, "decoderawtransaction", pl) + rpcpost(con, "decoderawtransaction", pl) } diff --git a/R/UtilFuncs.R b/R/UtilFuncs.R index b326eee..b0a5c94 100644 --- a/R/UtilFuncs.R +++ b/R/UtilFuncs.R @@ -2,7 +2,7 @@ #' #' This function returns the associated \code{POSIXct} time #' to the time stamp integer in a block header. -#' +#' #' @param x \code{integer}, the block header time stamp #' #' @return An object of class \code{POSIXct, POSIXt} @@ -27,7 +27,7 @@ int2date <- function(x){ #' #' This function returns the associated \code{integer} time #' for a given date/time object (coercible as \code{POSIXct} object. -#' +#' #' @param x \code{POSIXct}, date/time object. #' @return \code{integer} #' @family UtilityFuncs @@ -42,11 +42,11 @@ date2int <- function(x){ x <- as.POSIXct(x, tz = "GMT", origin = "1970-01-01") as.integer(x) } -#' Integer representation of a day-begin +#' Integer representation of a day-begin #' #' This function returns the associated \code{integer} time #' for the start of a specific day (\emph{i.e.}, \code{00:00:00} time). -#' +#' #' @param x \code{POSIXct}, date/time object. #' @return \code{integer} #' @family UtilityFuncs @@ -67,11 +67,11 @@ intMinDay <- function(x){ origin = "1970-01-01") date2int(s) } -#' Integer representation of a day-end +#' Integer representation of a day-end #' #' This function returns the associated \code{integer} time #' for the end of a specific day (\emph{i.e.}, \code{23:59:59} time). -#' +#' #' @param x \code{POSIXct}, date/time object. #' @return \code{integer} #' @family UtilityFuncs @@ -92,11 +92,11 @@ intMaxDay <- function(x){ origin = "1970-01-01") date2int(e) } -#' Integer range within a day +#' Integer range within a day #' #' This function returns the associated \code{integer} times #' for the start and end of a specific day. -#' +#' #' @param x \code{POSIXct}, date/time object. #' #' @return \code{integer} @@ -114,11 +114,11 @@ intRangeDay <- function(x){ d <- as.Date(x) c(first = intMinDay(d), last = intMaxDay(d)) } -#' Integer range between two dates +#' Integer range between two dates #' #' This function returns the associated \code{integer} times #' for the start of date \code{d1} and the end of date \code{d2}. -#' +#' #' @param d1 \code{POSIXct}, date/time object. #' @param d2 \code{POSIXct}, date/time object. #' @@ -148,7 +148,7 @@ intRangePeriod <- function(d1, d2){ #' #' This function retrieves the transaction IDs in a block. #' -#' @param obj \code{CONRPC}, configuration object. +#' @param con \code{CONRPC}, configuration object. #' @param height \code{integer}, the block's height. #' @param excoinbase \code{logical}, whether coinbase transaction #' should be excluded (default is \code{TRUE}). @@ -159,16 +159,16 @@ intRangePeriod <- function(d1, d2){ #' @name txids #' @rdname txids #' @export -txids <- function(obj, height, excoinbase = TRUE){ +txids <- function(con, height, excoinbase = TRUE){ height <- as.integer(abs(height)) - bc <- unlist(slot(getblockcount(obj), + bc <- unlist(slot(getblockcount(con), "result")) if (height > bc) { stop("'height' exceeds max height in local chain.\n") } - h <- slot(getblockhash(obj, height), + h <- slot(getblockhash(con, height), "result") - b <- slot(getblock(obj, h), + b <- slot(getblock(con, h), "result") ans <- unlist(b[["tx"]]) if (excoinbase){ @@ -184,7 +184,7 @@ txids <- function(obj, height, excoinbase = TRUE){ #' This function returns the transaction IDs of the inputs for #' a given transaction. #' -#' @param obj \code{CONRPC}, configuration object. +#' @param con \code{CONRPC}, configuration object. #' @param txid \code{character}, the id of the transaction. #' #' @return \code{data.frame}, the transaction ID(s) and @@ -194,10 +194,10 @@ txids <- function(obj, height, excoinbase = TRUE){ #' @name txinids #' @rdname txinids #' @export -txinids <- function(obj, txid){ - txraw <- slot(getrawtransaction(obj, txid), +txinids <- function(con, txid){ + txraw <- slot(getrawtransaction(con, txid), "result") - txdec <- slot(decoderawtransaction(obj, txraw), + txdec <- slot(decoderawtransaction(con, txraw), "result") vin <- txdec[["vin"]] txinids <- unlist(lapply(vin, function(x) x[["txid"]])) @@ -210,7 +210,7 @@ txinids <- function(obj, txid){ #' #' This function returns the values of UTXO(s) in a transaction. #' -#' @param obj \code{CONRPC}, configuration object. +#' @param con \code{CONRPC}, configuration object. #' @param txid \code{character}, the id of the transaction. #' #' @return \code{numeric} @@ -219,10 +219,10 @@ txinids <- function(obj, txid){ #' @name utxovalue #' @rdname utxovalue #' @export -utxovalue <- function(obj, txid){ - txraw <- slot(getrawtransaction(obj, txid), +utxovalue <- function(con, txid){ + txraw <- slot(getrawtransaction(con, txid), "result") - txdec <- slot(decoderawtransaction(obj, txraw), + txdec <- slot(decoderawtransaction(con, txraw), "result") vout <- txdec[["vout"]] ans <- unlist( @@ -230,3 +230,244 @@ utxovalue <- function(obj, txid){ ) ans } +#' Age of UTXOs +#' +#' This function returns a \code{difftime} object measuring the elapsed time(s) +#' between the UTXO(s) in a transaction and its input(s) (previous UTXO(s)). +#' +#' @param con \code{CONRPC}, configuration object. +#' @param txid \code{character}, the id of the transaction. +#' @param units \code{character}, the time difference units; +#' passed to \code{difftime()}. +#' +#' @return \code{difftime} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name utxoage +#' @rdname utxoage +#' @export +utxoage <- function(con, txid, + units = c("auto", "secs", "mins", + "hours", "days", "weeks")){ + txraw <- slot(getrawtransaction(con, txid, verbose = TRUE), + "result") + txotime <- int2date(txraw[["time"]]) + txins <- unlist(lapply(txraw[["vin"]], + function(x) x[["txid"]]) + ) + n <- length(txins) + txitime <- integer(n) + for (i in 1:n){ + txraw <- slot(getrawtransaction(con, txins[i], verbose = TRUE), + "result") + txitime[i] <- txraw[["time"]] + } + ans <- difftime(txotime, int2date(txitime), units = units) + list("TimeUtxo" = txraw[["time"]], + "AgeInput" = ans) +} +#' Compute fee of a transaction +#' +#' This function returns the implicit fee of a transaction, +#' by computing the difference between the sum of its inputs +#' and the sum of its outputs. +#' +#' @param con \code{CONRPC}, configuration object. +#' @param txid \code{character}, the id of the transaction. +#' +#' @return \code{numeric} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name txfee +#' @rdname txfee +#' @export +txfee <- function(con, txid){ + valo <- sum(utxovalue(con, txid)) + txin <- txinids(con, txid) + n <- nrow(txin) + vali <- 0 + for (i in 1:n){ + val <- utxovalue(con, txin[i, 1])[txin[i, 2]] + vali <- vali + val + } + ans <- vali - valo + ans +} +#' Obtaining statistics of a block +#' +#' This function returns key statistics of a block's content, +#' such as the time, the count of transactions, +#' and summary statistics of the UTXOs. +#' +#' @param con \code{CONRPC}, configuration object. +#' @param height \code{integer}, the block's height. +#' @param excoinbase \code{logical}, whether coinbase transaction +#' should be excluded (default is \code{TRUE}). +#' +#' @return An object of class \code{data.frame} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name blockstats +#' @rdname blockstats +#' @export +blockstats <- function(con, height, excoinbase = TRUE){ + height <- as.integer(abs(height)) + bc <- slot(getblockcount(con), + "result") + if (height > bc){ + stop("'height' exceeds max height in local chain.\n") + } + h <- slot(getblockhash(con, height), + "result") + b <- slot(getblock(con, h), + "result") + ## to be filled + btime <- b[["time"]] + txids <- unlist(b[["tx"]]) + n <- length(txids) + if (excoinbase){ + txids <- txids[-1] + } + n <- length(txids) + if (n < 1) { + warning("No transactions in block.\n") + umax <- NA + umin <- NA + uavg <- NA + umed <- NA + usum <- NA + } else { + usum <- 0 + uvals <- c() + for (i in 1:n){ + uval <- utxovalue(con, txids[i]) + usum <- usum + sum(uval) + uvals <- c(uvals, uval) + } + ## Summary statistics of uvals + umax <- max(uvals) + umin <- min(uvals) + uavg <- mean(uvals) + umed <- stats::median(uvals) + } + ans <- data.frame("Height" = height, + "Time" = btime, + "TxCount" = n, + "UtxoMax" = umax, + "UtxoMin" = umin, + "UtxoMean" = uavg, + "UtxoMedian" = umed, + "UtxoVolume" = usum + ) + ans +} +#' Statistics of a transaction +#' +#' This function returns key statistics/characteristics of +#' a transaction. +#' +#' @param con \code{CONRPC}, configuration object. +#' @param txid \code{character}, the id of the transaction. +#' +#' @return \code{data.frame} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name txstats +#' @rdname txstats +#' @export +txstats <- function(con, txid){ + txraw <- slot(getrawtransaction(con, txid, verbose = TRUE), + "result") + uvals <- utxovalue(con, txid) + fee <- txfee(con, txid) + ans <- data.frame("CountTxInIds" = length(txraw[["vin"]]), + "CountTxOutIds" = length(txraw[["vout"]]), + "SumOfUtxo" = sum(uvals), + "Fee" = fee, + "Size" = txraw[["size"]], + "Time" = txraw[["blocktime"]], + "BlockHash" = txraw[["blockhash"]], + "Confirmations" = txraw[["confirmations"]], + stringsAsFactors = FALSE) + ans +} +#' Time of a block +#' +#' This function returns the time of a block in GMT. +#' +#' @param con \code{CONRPC}, configuration object. +#' @param height \code{integer}, the height of the block. +#' +#' @return \code{POSIXct} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name timeofblock +#' @rdname timeofblock +#' @export +timeofblock <- function(con, height){ + height <- as.integer(abs(height)) + h <- slot(getblockhash(con, height), + "result") + b <- slot(getblock(con, h), + "result") + ans <- int2date(b[["time"]]) + ans +} +#' Block height at time +#' +#' This function returns the block heights closest to +#' a provided date/time (time zone is GMT). +#' +#' @param con \code{CONRPC}, configuration object. +#' @param targetdate \code{POSIXct}, the date/time of closest block heights. +#' +#' @return \code{data.frame}: the heights, the times and +#' the time differences (in minutes) to the provided date/time. +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name blockattime +#' @rdname blockattime +#' @export +blockattime <- function(con, targetdate){ + dt <- as.POSIXct(targetdate, tz = "GMT") + bh <- slot(getbestblockhash(con), + "result") + lastblock <- slot(getblock(con, bh), + "result") + lastheight <- lastblock[["height"]] + lasttime <- int2date(lastblock[["time"]]) + if (dt > lasttime) { + stop("Required block time is greater than last block in local chain.\n") + } + deltatime <- difftime(lasttime, dt, units = "mins") + deltaheight <- ceiling(as.numeric(deltatime / 10)) + approxh1 <- lastheight - deltaheight + ht <- timeofblock(con, approxh1) + signtimedelta <- searchdir <- sign(as.numeric(dt - ht)) + while (identical(signtimedelta, searchdir)) { + approxh1 <- approxh1 + searchdir + ht <- timeofblock(con, approxh1) + ## big step, if current delta time is more than 100 mins + curdelta <- as.numeric(abs( + difftime(dt, ht, units = "mins"))) + if (curdelta > 100){ + approxh1 <- approxh1 + searchdir * floor(curdelta / 10) + ht <- timeofblock(con, approxh1) + } + signtimedelta <- sign(as.numeric(dt - ht)) + } + approxt1 <- timeofblock(con, approxh1) + approxh2 <- approxh1 - searchdir + approxt2 <- timeofblock(con, approxh2) + Times <- c(approxt1, approxt2) + attr(Times, "tzone") <- "GMT" + ans <- data.frame("Height" = c(approxh1, approxh2), + "Time" = Times, + "DateQuery" = dt, + "DeltaMinutes" = difftime(dt, + c(approxt1, approxt2), + units = "mins") + ) + ans <- ans[order(ans[, 1]), ] + ans +} diff --git a/R/bitcoind.R b/R/bitcoind.R index ebd9761..640c4eb 100644 --- a/R/bitcoind.R +++ b/R/bitcoind.R @@ -10,10 +10,10 @@ #' @author Bernhard Pfaff #' @family bitcoind functions #' @name conrpc -#' @aliases conrpc +#' @aliases conrpc #' @rdname conrpc #' @export -#' +#' conrpc <- function(conf.file){ con <- file(conf.file, open = "r", blocking = FALSE) bconf <- readLines(con) @@ -68,10 +68,10 @@ conrpc <- function(conf.file){ #' @return \code{NULL} #' @family bitcoind functions #' @name startbtc -#' @aliases startbtc +#' @aliases startbtc #' @rdname startbtc #' @export -#' +#' startbtc <- function(confbtc){ stopifnot(class(confbtc) == "CONRPC") rpcuse <- slot(confbtc, "rpcuse") @@ -99,12 +99,12 @@ startbtc <- function(confbtc){ #' R function \code{system()}. #' #' @param confbtc \code{CONRPC} object, returned from \code{conrpc()}. -#' +#' #' @return NULL #' @author Bernhard Pfaff #' @family bitcoind functions #' @name stopbtc -#' @aliases stopbtc +#' @aliases stopbtc #' @rdname stopbtc #' @export #' @@ -127,25 +127,25 @@ stopbtc <- function(confbtc){ #' #' This function executes an RPC-JSON post. #' -#' @param obj \code{CONRPC} object, returned from \code{conrpc()}. +#' @param con \code{CONRPC} object, returned from \code{conrpc()}. #' @param api \code{character} the name of the RPC function. #' @param plist \code{list} a named list object of the parameters for \code{api} -#' +#' #' @return A \code{list} object, coerced JSON answer from RPC. #' @author Bernhard Pfaff #' @family bitcoind functions #' @name rpcpost -#' @aliases rpcpost +#' @aliases rpcpost #' @rdname rpcpost #' @export #' -rpcpost <- function(obj, api, plist = list()){ - stopifnot(class(obj) == "CONRPC") +rpcpost <- function(con, api, plist = list()){ + stopifnot(class(con) == "CONRPC") api <- as.character(api) pid <- paste("rbtc", api, sep = "-") - ans <- POST(slot(obj, "url"), - authenticate(user = slot(obj, "rpcuse"), - password = slot(obj, "rpcpwd"), + ans <- POST(slot(con, "url"), + authenticate(user = slot(con, "rpcuse"), + password = slot(con, "rpcpwd"), type = "basic"), body = list(jsonrpc = "1.0", id = pid, diff --git a/man/ANSRPC-class.Rd b/man/ANSRPC-class.Rd index d035186..4d5bf97 100644 --- a/man/ANSRPC-class.Rd +++ b/man/ANSRPC-class.Rd @@ -31,3 +31,4 @@ Other bitcoind functions: \code{\link{CONRPC-class}}, \code{\link{rpcpost}}, \code{\link{startbtc}}, \code{\link{stopbtc}} } +\concept{bitcoind functions} diff --git a/man/BTCADR-class.Rd b/man/BTCADR-class.Rd index c1f9366..4fc41e2 100644 --- a/man/BTCADR-class.Rd +++ b/man/BTCADR-class.Rd @@ -41,3 +41,4 @@ Other BtcAdresses: \code{\link{PrivKey2PubKey}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/CONRPC-class.Rd b/man/CONRPC-class.Rd index 8a22464..999c299 100644 --- a/man/CONRPC-class.Rd +++ b/man/CONRPC-class.Rd @@ -20,3 +20,4 @@ Other bitcoind functions: \code{\link{ANSRPC-class}}, \code{\link{rpcpost}}, \code{\link{startbtc}}, \code{\link{stopbtc}} } +\concept{bitcoind functions} diff --git a/man/ECPARAM-class.Rd b/man/ECPARAM-class.Rd index 9e40b3d..21c57cd 100644 --- a/man/ECPARAM-class.Rd +++ b/man/ECPARAM-class.Rd @@ -33,3 +33,4 @@ Other EllipticCurve: \code{\link{ECPOINT-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/ECPOINT-class.Rd b/man/ECPOINT-class.Rd index a112cc4..1878f90 100644 --- a/man/ECPOINT-class.Rd +++ b/man/ECPOINT-class.Rd @@ -34,3 +34,4 @@ Other EllipticCurve: \code{\link{ECPARAM-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/EcparamOrNull-class.Rd b/man/EcparamOrNull-class.Rd index dedb1c6..5e70b65 100644 --- a/man/EcparamOrNull-class.Rd +++ b/man/EcparamOrNull-class.Rd @@ -19,3 +19,4 @@ Other EllipticCurve: \code{\link{ECPARAM-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/NullOrCharacter-class.Rd b/man/NullOrCharacter-class.Rd index 3f5f0f6..05ee38c 100644 --- a/man/NullOrCharacter-class.Rd +++ b/man/NullOrCharacter-class.Rd @@ -14,3 +14,4 @@ Other bitcoind functions: \code{\link{ANSRPC-class}}, \code{\link{rpcpost}}, \code{\link{startbtc}}, \code{\link{stopbtc}} } +\concept{bitcoind functions} diff --git a/man/NullOrInteger-class.Rd b/man/NullOrInteger-class.Rd index 1a31497..19def30 100644 --- a/man/NullOrInteger-class.Rd +++ b/man/NullOrInteger-class.Rd @@ -14,3 +14,4 @@ Other bitcoind functions: \code{\link{ANSRPC-class}}, \code{\link{conrpc}}, \code{\link{rpcpost}}, \code{\link{startbtc}}, \code{\link{stopbtc}} } +\concept{bitcoind functions} diff --git a/man/PrivKey2PubKey.Rd b/man/PrivKey2PubKey.Rd index 642e183..8580e09 100644 --- a/man/PrivKey2PubKey.Rd +++ b/man/PrivKey2PubKey.Rd @@ -36,3 +36,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/PrivKey2Wif.Rd b/man/PrivKey2Wif.Rd index 08ae52f..ccd944d 100644 --- a/man/PrivKey2Wif.Rd +++ b/man/PrivKey2Wif.Rd @@ -41,3 +41,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/PubHash2BtcAdr.Rd b/man/PubHash2BtcAdr.Rd index cb232a0..4d68d45 100644 --- a/man/PubHash2BtcAdr.Rd +++ b/man/PubHash2BtcAdr.Rd @@ -33,3 +33,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/PubKey2PubHash.Rd b/man/PubKey2PubHash.Rd index fe15595..7f32aeb 100644 --- a/man/PubKey2PubHash.Rd +++ b/man/PubKey2PubHash.Rd @@ -36,3 +36,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/Wif2PrivKey.Rd b/man/Wif2PrivKey.Rd index 9a97572..8f8a7bd 100644 --- a/man/Wif2PrivKey.Rd +++ b/man/Wif2PrivKey.Rd @@ -40,3 +40,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/addnode.Rd b/man/addnode.Rd index 060493d..70769d3 100644 --- a/man/addnode.Rd +++ b/man/addnode.Rd @@ -4,10 +4,10 @@ \alias{addnode} \title{RPC-JSON API: addnode} \usage{ -addnode(obj, node, command = c("add", "remove", "onetry")) +addnode(con, node, command = c("add", "remove", "onetry")) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{node}{\code{character} the node (see \code{getpeerinfo()} for nodes).} @@ -38,3 +38,4 @@ Other Network RPCs: \code{\link{clearbanned}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/base58CheckDecode.Rd b/man/base58CheckDecode.Rd index 032f0fc..377e8a8 100644 --- a/man/base58CheckDecode.Rd +++ b/man/base58CheckDecode.Rd @@ -37,3 +37,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/base58CheckEncode.Rd b/man/base58CheckEncode.Rd index 610c882..0dc1528 100644 --- a/man/base58CheckEncode.Rd +++ b/man/base58CheckEncode.Rd @@ -38,3 +38,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/blockattime.Rd b/man/blockattime.Rd new file mode 100644 index 0000000..de20c15 --- /dev/null +++ b/man/blockattime.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{blockattime} +\alias{blockattime} +\title{Block height at time} +\usage{ +blockattime(con, targetdate) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{targetdate}{\code{POSIXct}, the date/time of closest block heights.} +} +\value{ +\code{data.frame}: the heights, the times and +the time differences (in minutes) to the provided date/time. +} +\description{ +This function returns the block heights closest to +a provided date/time (time zone is GMT). +} +\seealso{ +Other UtilityFuncs: \code{\link{blockstats}}, + \code{\link{date2int}}, \code{\link{int2date}}, + \code{\link{intMaxDay}}, \code{\link{intMinDay}}, + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/blockstats.Rd b/man/blockstats.Rd new file mode 100644 index 0000000..1ce3268 --- /dev/null +++ b/man/blockstats.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{blockstats} +\alias{blockstats} +\title{Obtaining statistics of a block} +\usage{ +blockstats(con, height, excoinbase = TRUE) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{height}{\code{integer}, the block's height.} + +\item{excoinbase}{\code{logical}, whether coinbase transaction +should be excluded (default is \code{TRUE}).} +} +\value{ +An object of class \code{data.frame} +} +\description{ +This function returns key statistics of a block's content, +such as the time, the count of transactions, +and summary statistics of the UTXOs. +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{date2int}}, \code{\link{int2date}}, + \code{\link{intMaxDay}}, \code{\link{intMinDay}}, + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/clearbanned.Rd b/man/clearbanned.Rd index c50b843..4ad07e0 100644 --- a/man/clearbanned.Rd +++ b/man/clearbanned.Rd @@ -4,10 +4,10 @@ \alias{clearbanned} \title{RPC-JSON API: clearbanned} \usage{ -clearbanned(obj) +clearbanned(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -31,3 +31,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/concatHex.Rd b/man/concatHex.Rd index 5f006c3..25fdc17 100644 --- a/man/concatHex.Rd +++ b/man/concatHex.Rd @@ -43,3 +43,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/conrpc.Rd b/man/conrpc.Rd index d81b460..6e455fd 100644 --- a/man/conrpc.Rd +++ b/man/conrpc.Rd @@ -27,3 +27,4 @@ Other bitcoind functions: \code{\link{ANSRPC-class}}, \author{ Bernhard Pfaff } +\concept{bitcoind functions} diff --git a/man/containsPoint-methods.Rd b/man/containsPoint-methods.Rd index bce2085..40c14cd 100644 --- a/man/containsPoint-methods.Rd +++ b/man/containsPoint-methods.Rd @@ -51,3 +51,4 @@ Other EllipticCurve: \code{\link{ECPARAM-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/createBtcAdr.Rd b/man/createBtcAdr.Rd index bb606ca..5364c8a 100644 --- a/man/createBtcAdr.Rd +++ b/man/createBtcAdr.Rd @@ -34,3 +34,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/createPrivateKey.Rd b/man/createPrivateKey.Rd index fb35aa2..f248006 100644 --- a/man/createPrivateKey.Rd +++ b/man/createPrivateKey.Rd @@ -33,3 +33,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/date2int.Rd b/man/date2int.Rd index f9199ce..1747e38 100644 --- a/man/date2int.Rd +++ b/man/date2int.Rd @@ -21,10 +21,16 @@ d <- "2017-03-15" date2int(d) } \seealso{ -Other UtilityFuncs: \code{\link{int2date}}, +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{int2date}}, \code{\link{intMaxDay}}, \code{\link{intMinDay}}, - \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} } \author{ Bernhard Pfaff } +\concept{UtilityFuncs} diff --git a/man/decodeHex.Rd b/man/decodeHex.Rd index 995eee0..c86b1e7 100644 --- a/man/decodeHex.Rd +++ b/man/decodeHex.Rd @@ -39,3 +39,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/decoderawtransaction.Rd b/man/decoderawtransaction.Rd index 21a9f35..cfb66a6 100644 --- a/man/decoderawtransaction.Rd +++ b/man/decoderawtransaction.Rd @@ -4,10 +4,10 @@ \alias{decoderawtransaction} \title{RPC-JSON API: decoderawtransaction} \usage{ -decoderawtransaction(obj, hexstring) +decoderawtransaction(con, hexstring) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{hexstring}{\code{character}, the transaction hex string.} } @@ -28,3 +28,4 @@ Other RawTransactions RPCs: \code{\link{getrawtransaction}} \author{ Bernhard Pfaff } +\concept{RawTransactions RPCs} diff --git a/man/decodescript.Rd b/man/decodescript.Rd new file mode 100644 index 0000000..7460954 --- /dev/null +++ b/man/decodescript.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{decodescript} +\alias{decodescript} +\title{RPC-JSON API: decodescript} +\usage{ +decodescript(con, redeem) +} +\arguments{ +\item{con}{object of class \code{CONRPC}.} + +\item{redeem}{\code{character}, the P2SH.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +The decodescript RPC decodes a hex-encoded P2SH redeem script. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#decodescript}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Blockchain RPCs: \code{\link{getbestblockhash}}, + \code{\link{getblockchaininfo}}, + \code{\link{getblockcount}}, \code{\link{getblockhash}}, + \code{\link{getblockheader}}, \code{\link{getblock}}, + \code{\link{getchaintips}}, + \code{\link{getchaintxstats}}, + \code{\link{getdifficulty}}, + \code{\link{getmempoolancestors}}, + \code{\link{getmempooldescendants}}, + \code{\link{getmempoolentry}}, + \code{\link{getmempoolinfo}}, + \code{\link{getrawmempool}}, \code{\link{gettxoutproof}}, + \code{\link{gettxoutsetinfo}}, \code{\link{gettxout}}, + \code{\link{preciousblock}}, + \code{\link{pruneblockchain}}, \code{\link{verifychain}}, + \code{\link{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} +\concept{Blockchain RPCs} diff --git a/man/disconnectnode.Rd b/man/disconnectnode.Rd index d859510..87d8b1e 100644 --- a/man/disconnectnode.Rd +++ b/man/disconnectnode.Rd @@ -4,10 +4,10 @@ \alias{disconnectnode} \title{RPC-JSON API: disconnectnode} \usage{ -disconnectnode(obj, address = NULL, nodeid = NULL) +disconnectnode(con, address = NULL, nodeid = NULL) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{address}{\code{character} the IP address/port of the node.} @@ -39,3 +39,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/ecoperators-methods.Rd b/man/ecoperators-methods.Rd index c6f1429..33300ae 100644 --- a/man/ecoperators-methods.Rd +++ b/man/ecoperators-methods.Rd @@ -67,3 +67,4 @@ Other EllipticCurve: \code{\link{ECPARAM-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/ecparam.Rd b/man/ecparam.Rd index 376d9ea..8a4e7b3 100644 --- a/man/ecparam.Rd +++ b/man/ecparam.Rd @@ -40,3 +40,4 @@ Other EllipticCurve: \code{\link{ECPARAM-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/ecpoint.Rd b/man/ecpoint.Rd index df29733..848f5c6 100644 --- a/man/ecpoint.Rd +++ b/man/ecpoint.Rd @@ -46,3 +46,4 @@ Other EllipticCurve: \code{\link{ECPARAM-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/getaddednodeinfo.Rd b/man/getaddednodeinfo.Rd index 0ef315f..5699f9b 100644 --- a/man/getaddednodeinfo.Rd +++ b/man/getaddednodeinfo.Rd @@ -4,10 +4,10 @@ \alias{getaddednodeinfo} \title{RPC-JSON API: getaddednodeinfo} \usage{ -getaddednodeinfo(obj, node = NULL) +getaddednodeinfo(con, node = NULL) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{node}{\code{character} the node (see \code{getpeerinfo()} for nodes).} @@ -35,3 +35,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/getbestblockhash.Rd b/man/getbestblockhash.Rd index 581415c..75e9670 100644 --- a/man/getbestblockhash.Rd +++ b/man/getbestblockhash.Rd @@ -4,10 +4,10 @@ \alias{getbestblockhash} \title{RPC-JSON API: getbestblockhash} \usage{ -getbestblockhash(obj) +getbestblockhash(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -20,7 +20,8 @@ Returns the hash of the best (tip) block in the longest blockchain. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getblockchaininfo}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, \code{\link{getchaintips}}, @@ -39,3 +40,4 @@ Other Blockchain RPCs: \code{\link{getblockchaininfo}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getblock.Rd b/man/getblock.Rd index 8577bda..c665704 100644 --- a/man/getblock.Rd +++ b/man/getblock.Rd @@ -4,10 +4,10 @@ \alias{getblock} \title{RPC-JSON API: getblock} \usage{ -getblock(obj, blockhash, verbosity = c("l1", "l0", "l2")) +getblock(con, blockhash, verbosity = c("l1", "l0", "l2")) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{blockhash}{\code{character}, the block hash.} @@ -34,7 +34,8 @@ information about each transaction. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getchaintips}}, @@ -53,3 +54,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getblockchaininfo.Rd b/man/getblockchaininfo.Rd index 60cd61a..a036346 100644 --- a/man/getblockchaininfo.Rd +++ b/man/getblockchaininfo.Rd @@ -4,10 +4,10 @@ \alias{getblockchaininfo} \title{RPC-JSON API: getblockchaininfo} \usage{ -getblockchaininfo(obj) +getblockchaininfo(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -20,7 +20,8 @@ Returns an object containing various state info regarding blockchain processing. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, \code{\link{getchaintips}}, @@ -39,3 +40,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getblockcount.Rd b/man/getblockcount.Rd index 80fdc87..a9dd83d 100644 --- a/man/getblockcount.Rd +++ b/man/getblockcount.Rd @@ -4,10 +4,10 @@ \alias{getblockcount} \title{RPC-JSON API: getblockcount} \usage{ -getblockcount(obj) +getblockcount(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -20,7 +20,8 @@ Returns the number of blocks in the longest blockchain. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, \code{\link{getchaintips}}, @@ -39,3 +40,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getblockhash.Rd b/man/getblockhash.Rd index fdd4656..e1f487a 100644 --- a/man/getblockhash.Rd +++ b/man/getblockhash.Rd @@ -4,10 +4,10 @@ \alias{getblockhash} \title{RPC-JSON API: getblockhash} \usage{ -getblockhash(obj, height) +getblockhash(con, height) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{height}{\code{integer} the height index.} } @@ -22,7 +22,8 @@ Returns hash of block in best-block-chain at height provided. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -42,3 +43,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getblockheader.Rd b/man/getblockheader.Rd index d91b148..68122f8 100644 --- a/man/getblockheader.Rd +++ b/man/getblockheader.Rd @@ -4,10 +4,10 @@ \alias{getblockheader} \title{RPC-JSON API: getblockheader} \usage{ -getblockheader(obj, hash, verbose = TRUE) +getblockheader(con, hash, verbose = TRUE) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{hash}{\code{character} the block hash.} @@ -32,7 +32,8 @@ returns an Object with information about blockheader . \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblock}}, \code{\link{getchaintips}}, @@ -51,3 +52,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getchaintips.Rd b/man/getchaintips.Rd index eb9b9b0..afa688b 100644 --- a/man/getchaintips.Rd +++ b/man/getchaintips.Rd @@ -4,10 +4,10 @@ \alias{getchaintips} \title{RPC-JSON API: getchaintips} \usage{ -getchaintips(obj) +getchaintips(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -21,7 +21,8 @@ including the main chain as well as orphaned branches. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -40,3 +41,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getchaintxstats.Rd b/man/getchaintxstats.Rd index 378f062..42a6888 100644 --- a/man/getchaintxstats.Rd +++ b/man/getchaintxstats.Rd @@ -4,10 +4,10 @@ \alias{getchaintxstats} \title{RPC-JSON API: getchaintxstats} \usage{ -getchaintxstats(obj, nblocks = NULL, blockhash = NULL) +getchaintxstats(con, nblocks = NULL, blockhash = NULL) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{nblocks}{\code{integer} optional, size of the window in number of blocks (default: one month).} @@ -27,7 +27,8 @@ rate of transactions in the chain. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -45,3 +46,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getconnectioncount.Rd b/man/getconnectioncount.Rd index b0ca21d..6d7961b 100644 --- a/man/getconnectioncount.Rd +++ b/man/getconnectioncount.Rd @@ -4,10 +4,10 @@ \alias{getconnectioncount} \title{RPC-JSON API: getconnectioncount} \usage{ -getconnectioncount(obj) +getconnectioncount(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -30,3 +30,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/getdifficulty.Rd b/man/getdifficulty.Rd index 368ed21..4fa782c 100644 --- a/man/getdifficulty.Rd +++ b/man/getdifficulty.Rd @@ -4,10 +4,10 @@ \alias{getdifficulty} \title{RPC-JSON API: getdifficulty} \usage{ -getdifficulty(obj) +getdifficulty(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -20,7 +20,8 @@ Returns the proof-of-work difficulty as a multiple of the minimum difficulty. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -39,3 +40,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/gethelp.Rd b/man/gethelp.Rd index c7dcfd3..37030ef 100644 --- a/man/gethelp.Rd +++ b/man/gethelp.Rd @@ -4,10 +4,10 @@ \alias{gethelp} \title{RPC-JSON API: Help} \usage{ -gethelp(obj, rpc = "") +gethelp(con, rpc = "") } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{rpc}{\code{character}, name of RPC function.} } @@ -28,3 +28,4 @@ Other Control RPCs: \code{\link{getinfo}}, \author{ Bernhard Pfaff } +\concept{Control RPCs} diff --git a/man/getinfo.Rd b/man/getinfo.Rd index aa6deb4..55525f8 100644 --- a/man/getinfo.Rd +++ b/man/getinfo.Rd @@ -4,10 +4,10 @@ \alias{getinfo} \title{RPC-JSON API: getinfo} \usage{ -getinfo(obj) +getinfo(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -31,3 +31,4 @@ Other Control RPCs: \code{\link{gethelp}}, \author{ Bernhard Pfaff } +\concept{Control RPCs} diff --git a/man/getmempoolancestors.Rd b/man/getmempoolancestors.Rd index cdffc04..84799a0 100644 --- a/man/getmempoolancestors.Rd +++ b/man/getmempoolancestors.Rd @@ -4,10 +4,10 @@ \alias{getmempoolancestors} \title{RPC-JSON API: getmempoolancestors} \usage{ -getmempoolancestors(obj, txid, verbose = FALSE) +getmempoolancestors(con, txid, verbose = FALSE) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{txid}{\code{character}, the transaction id (must be in mempool).} @@ -25,7 +25,8 @@ If txid is in the mempool, returns all in-mempool ancestors. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -44,3 +45,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getmempooldescendants.Rd b/man/getmempooldescendants.Rd index 1142ff8..de61dd2 100644 --- a/man/getmempooldescendants.Rd +++ b/man/getmempooldescendants.Rd @@ -4,10 +4,10 @@ \alias{getmempooldescendants} \title{RPC-JSON API: getmempooldescendants} \usage{ -getmempooldescendants(obj, txid, verbose = FALSE) +getmempooldescendants(con, txid, verbose = FALSE) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{txid}{\code{character}, the transaction id (must be in mempool).} @@ -25,7 +25,8 @@ If txid is in the mempool, returns all in-mempool descendants. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -44,3 +45,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getmempoolentry.Rd b/man/getmempoolentry.Rd index 77d8bf7..fd3af45 100644 --- a/man/getmempoolentry.Rd +++ b/man/getmempoolentry.Rd @@ -4,10 +4,10 @@ \alias{getmempoolentry} \title{RPC-JSON API: getmempoolentry} \usage{ -getmempoolentry(obj, txid) +getmempoolentry(con, txid) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{txid}{\code{character}, the transaction id (must be in mempool).} } @@ -22,7 +22,8 @@ Returns mempool data for given transaction. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -41,3 +42,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getmempoolinfo.Rd b/man/getmempoolinfo.Rd index 902f02d..7632294 100644 --- a/man/getmempoolinfo.Rd +++ b/man/getmempoolinfo.Rd @@ -4,10 +4,10 @@ \alias{getmempoolinfo} \title{RPC-JSON API: getmempoolinfo} \usage{ -getmempoolinfo(obj) +getmempoolinfo(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -20,7 +20,8 @@ Returns details on the active state of the TX memory pool. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -39,3 +40,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getnettotals.Rd b/man/getnettotals.Rd index 5245ac5..7b6fde1 100644 --- a/man/getnettotals.Rd +++ b/man/getnettotals.Rd @@ -4,10 +4,10 @@ \alias{getnettotals} \title{RPC-JSON API: getnettotals} \usage{ -getnettotals(obj) +getnettotals(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -32,3 +32,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/getnetworkinfo.Rd b/man/getnetworkinfo.Rd index b480d7f..0701df6 100644 --- a/man/getnetworkinfo.Rd +++ b/man/getnetworkinfo.Rd @@ -4,10 +4,10 @@ \alias{getnetworkinfo} \title{RPC-JSON API: getnetworkinfo} \usage{ -getnetworkinfo(obj) +getnetworkinfo(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -31,3 +31,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/getpeerinfo.Rd b/man/getpeerinfo.Rd index e7b9164..431097b 100644 --- a/man/getpeerinfo.Rd +++ b/man/getpeerinfo.Rd @@ -4,10 +4,10 @@ \alias{getpeerinfo} \title{RPC-JSON API: getpeerinfo} \usage{ -getpeerinfo(obj) +getpeerinfo(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -31,3 +31,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/getrawmempool.Rd b/man/getrawmempool.Rd index 381d0b3..076fa0b 100644 --- a/man/getrawmempool.Rd +++ b/man/getrawmempool.Rd @@ -4,10 +4,10 @@ \alias{getrawmempool} \title{RPC-JSON API: getrawmempool} \usage{ -getrawmempool(obj, verbose = TRUE) +getrawmempool(con, verbose = TRUE) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{verbose}{\code{logical}, \code{TRUE} for a json object, \code{FALSE} for array of transaction ids} @@ -26,7 +26,8 @@ from the mempool. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -46,3 +47,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getrawtransaction.Rd b/man/getrawtransaction.Rd index 65d5f04..8cc9a54 100644 --- a/man/getrawtransaction.Rd +++ b/man/getrawtransaction.Rd @@ -4,10 +4,10 @@ \alias{getrawtransaction} \title{RPC-JSON API: getrawtransaction} \usage{ -getrawtransaction(obj, txid, verbose = FALSE) +getrawtransaction(con, txid, verbose = FALSE) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{txid}{\code{character}, the transaction id.} @@ -39,3 +39,4 @@ Other RawTransactions RPCs: \code{\link{decoderawtransaction}} \author{ Bernhard Pfaff } +\concept{RawTransactions RPCs} diff --git a/man/gettxout.Rd b/man/gettxout.Rd index 89dae8b..08dad74 100644 --- a/man/gettxout.Rd +++ b/man/gettxout.Rd @@ -4,10 +4,10 @@ \alias{gettxout} \title{RPC-JSON API: gettxout} \usage{ -gettxout(obj, txid, n, incmempool = TRUE) +gettxout(con, txid, n, incmempool = TRUE) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{txid}{\code{charcater} the transaction id.} @@ -29,7 +29,8 @@ Note that an unspent output that is spent in the mempool won't appear. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -49,3 +50,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/gettxoutproof.Rd b/man/gettxoutproof.Rd index 3ca0741..a585116 100644 --- a/man/gettxoutproof.Rd +++ b/man/gettxoutproof.Rd @@ -4,10 +4,10 @@ \alias{gettxoutproof} \title{RPC-JSON API: gettxoutproof} \usage{ -gettxoutproof(obj, txids, blockhash = NULL) +gettxoutproof(con, txids, blockhash = NULL) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{txids}{\code{charcater} a json array of txids to filter.} @@ -32,7 +32,8 @@ option or specify the block in which the transaction is included manually \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -52,3 +53,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/gettxoutsetinfo.Rd b/man/gettxoutsetinfo.Rd index 5185d2c..976287b 100644 --- a/man/gettxoutsetinfo.Rd +++ b/man/gettxoutsetinfo.Rd @@ -4,10 +4,10 @@ \alias{gettxoutsetinfo} \title{RPC-JSON API: gettxoutsetinfo} \usage{ -gettxoutsetinfo(obj) +gettxoutsetinfo(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -21,7 +21,8 @@ Note this call may take some time. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -40,3 +41,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/getwalletinfo.Rd b/man/getwalletinfo.Rd index 67595ee..92f3984 100644 --- a/man/getwalletinfo.Rd +++ b/man/getwalletinfo.Rd @@ -4,10 +4,10 @@ \alias{getwalletinfo} \title{RPC-JSON API: getwalletinfo} \usage{ -getwalletinfo(obj) +getwalletinfo(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -26,3 +26,4 @@ Other Control RPCs: \code{\link{gethelp}}, \author{ Bernhard Pfaff } +\concept{Control RPCs} diff --git a/man/hash160.Rd b/man/hash160.Rd index a64f658..99413c3 100644 --- a/man/hash160.Rd +++ b/man/hash160.Rd @@ -34,3 +34,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/hash256.Rd b/man/hash256.Rd index 0dcf959..24a89b4 100644 --- a/man/hash256.Rd +++ b/man/hash256.Rd @@ -33,3 +33,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/int2date.Rd b/man/int2date.Rd index fd61c91..9f0edb1 100644 --- a/man/int2date.Rd +++ b/man/int2date.Rd @@ -24,10 +24,16 @@ int2date(ts) \url{https://en.bitcoin.it/wiki/Block_timestamp} } \seealso{ -Other UtilityFuncs: \code{\link{date2int}}, +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, \code{\link{intMaxDay}}, \code{\link{intMinDay}}, - \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} } \author{ Bernhard Pfaff } +\concept{UtilityFuncs} diff --git a/man/intMaxDay.Rd b/man/intMaxDay.Rd index 7e32f9b..c314bed 100644 --- a/man/intMaxDay.Rd +++ b/man/intMaxDay.Rd @@ -24,10 +24,16 @@ d2 <- intMaxDay(d2) identical(d1,d2) } \seealso{ -Other UtilityFuncs: \code{\link{date2int}}, +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, \code{\link{int2date}}, \code{\link{intMinDay}}, - \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} } \author{ Bernhard Pfaff } +\concept{UtilityFuncs} diff --git a/man/intMinDay.Rd b/man/intMinDay.Rd index 181af38..cb39b80 100644 --- a/man/intMinDay.Rd +++ b/man/intMinDay.Rd @@ -24,10 +24,16 @@ d2 <- intMinDay(d2) identical(d1,d2) } \seealso{ -Other UtilityFuncs: \code{\link{date2int}}, +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, \code{\link{int2date}}, \code{\link{intMaxDay}}, - \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} } \author{ Bernhard Pfaff } +\concept{UtilityFuncs} diff --git a/man/intRangeDay.Rd b/man/intRangeDay.Rd index 68eb7fa..349a3f1 100644 --- a/man/intRangeDay.Rd +++ b/man/intRangeDay.Rd @@ -23,10 +23,16 @@ intMinDay(d1) intMaxDay(d1) } \seealso{ -Other UtilityFuncs: \code{\link{date2int}}, +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, \code{\link{int2date}}, \code{\link{intMaxDay}}, - \code{\link{intMinDay}}, \code{\link{intRangePeriod}} + \code{\link{intMinDay}}, \code{\link{intRangePeriod}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} } \author{ Bernhard Pfaff } +\concept{UtilityFuncs} diff --git a/man/intRangePeriod.Rd b/man/intRangePeriod.Rd index ecb2bb3..62ca70a 100644 --- a/man/intRangePeriod.Rd +++ b/man/intRangePeriod.Rd @@ -26,10 +26,16 @@ intMinDay(d1) intMaxDay(d2) } \seealso{ -Other UtilityFuncs: \code{\link{date2int}}, +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, \code{\link{int2date}}, \code{\link{intMaxDay}}, - \code{\link{intMinDay}}, \code{\link{intRangeDay}} + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{timeofblock}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} } \author{ Bernhard Pfaff } +\concept{UtilityFuncs} diff --git a/man/isNull-methods.Rd b/man/isNull-methods.Rd index b3a2c8c..47b67b3 100644 --- a/man/isNull-methods.Rd +++ b/man/isNull-methods.Rd @@ -32,3 +32,4 @@ Other EllipticCurve: \code{\link{ECPARAM-class}}, \author{ Bernhard Pfaff } +\concept{EllipticCurve} diff --git a/man/listbanned.Rd b/man/listbanned.Rd index 5f7e118..978dd70 100644 --- a/man/listbanned.Rd +++ b/man/listbanned.Rd @@ -4,10 +4,10 @@ \alias{listbanned} \title{RPC-JSON API: listbanned} \usage{ -listbanned(obj) +listbanned(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -31,3 +31,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/ping.Rd b/man/ping.Rd index 05d13cf..d3769ee 100644 --- a/man/ping.Rd +++ b/man/ping.Rd @@ -4,10 +4,10 @@ \alias{ping} \title{RPC-JSON API: ping} \usage{ -ping(obj) +ping(con) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} } \value{ A S4-object of class \code{ANSRPC}. @@ -34,3 +34,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/preciousblock.Rd b/man/preciousblock.Rd index 28d4d46..85fa404 100644 --- a/man/preciousblock.Rd +++ b/man/preciousblock.Rd @@ -4,10 +4,10 @@ \alias{preciousblock} \title{RPC-JSON API: preciousblock} \usage{ -preciousblock(obj, blockhash) +preciousblock(con, blockhash) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{blockhash}{\code{character}, the hash of the block to mark as precious.} } @@ -24,7 +24,8 @@ are not retained across restarts. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -43,3 +44,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/pruneblockchain.Rd b/man/pruneblockchain.Rd index 9370baf..ec0cd0f 100644 --- a/man/pruneblockchain.Rd +++ b/man/pruneblockchain.Rd @@ -4,10 +4,10 @@ \alias{pruneblockchain} \title{RPC-JSON API: pruneblockchain} \usage{ -pruneblockchain(obj, height) +pruneblockchain(con, height) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{height}{\code{integer} The block height to prune up to.} } @@ -28,7 +28,8 @@ is at least 2 hours older than the provided timestamp. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -47,3 +48,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/rpcpost.Rd b/man/rpcpost.Rd index a0d6430..60c7e7d 100644 --- a/man/rpcpost.Rd +++ b/man/rpcpost.Rd @@ -4,10 +4,10 @@ \alias{rpcpost} \title{HTTP post of RPC-JSON} \usage{ -rpcpost(obj, api, plist = list()) +rpcpost(con, api, plist = list()) } \arguments{ -\item{obj}{\code{CONRPC} object, returned from \code{conrpc()}.} +\item{con}{\code{CONRPC} object, returned from \code{conrpc()}.} \item{api}{\code{character} the name of the RPC function.} @@ -29,3 +29,4 @@ Other bitcoind functions: \code{\link{ANSRPC-class}}, \author{ Bernhard Pfaff } +\concept{bitcoind functions} diff --git a/man/setnetworkactive.Rd b/man/setnetworkactive.Rd index db84057..acb7809 100644 --- a/man/setnetworkactive.Rd +++ b/man/setnetworkactive.Rd @@ -4,10 +4,10 @@ \alias{setnetworkactive} \title{RPC-JSON API: setnetworkactive} \usage{ -setnetworkactive(obj, state = TRUE) +setnetworkactive(con, state = TRUE) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{state}{\code{logical} the network state.} } @@ -33,3 +33,4 @@ Other Network RPCs: \code{\link{addnode}}, \author{ Bernhard Pfaff } +\concept{Network RPCs} diff --git a/man/startbtc.Rd b/man/startbtc.Rd index 0873caa..cf1ad74 100644 --- a/man/startbtc.Rd +++ b/man/startbtc.Rd @@ -32,3 +32,4 @@ Other bitcoind functions: \code{\link{ANSRPC-class}}, \author{ Bernhard Pfaff } +\concept{bitcoind functions} diff --git a/man/stopbtc.Rd b/man/stopbtc.Rd index 3f8d0b2..9bae89b 100644 --- a/man/stopbtc.Rd +++ b/man/stopbtc.Rd @@ -24,3 +24,4 @@ Other bitcoind functions: \code{\link{ANSRPC-class}}, \author{ Bernhard Pfaff } +\concept{bitcoind functions} diff --git a/man/timeofblock.Rd b/man/timeofblock.Rd new file mode 100644 index 0000000..523cb17 --- /dev/null +++ b/man/timeofblock.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{timeofblock} +\alias{timeofblock} +\title{Time of a block} +\usage{ +timeofblock(con, height) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{height}{\code{integer}, the height of the block.} +} +\value{ +\code{POSIXct} +} +\description{ +This function returns the time of a block in GMT. +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{intRangePeriod}}, \code{\link{txfee}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/txfee.Rd b/man/txfee.Rd new file mode 100644 index 0000000..8455750 --- /dev/null +++ b/man/txfee.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{txfee} +\alias{txfee} +\title{Compute fee of a transaction} +\usage{ +txfee(con, txid) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{txid}{\code{character}, the id of the transaction.} +} +\value{ +\code{numeric} +} +\description{ +This function returns the implicit fee of a transaction, +by computing the difference between the sum of its inputs +and the sum of its outputs. +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{intRangePeriod}}, \code{\link{timeofblock}}, + \code{\link{txids}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/txids.Rd b/man/txids.Rd new file mode 100644 index 0000000..dd5143d --- /dev/null +++ b/man/txids.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{txids} +\alias{txids} +\title{Retrieve TX Ids in block} +\usage{ +txids(con, height, excoinbase = TRUE) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{height}{\code{integer}, the block's height.} + +\item{excoinbase}{\code{logical}, whether coinbase transaction +should be excluded (default is \code{TRUE}).} +} +\value{ +\code{character} +} +\description{ +This function retrieves the transaction IDs in a block. +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{intRangePeriod}}, \code{\link{timeofblock}}, + \code{\link{txfee}}, \code{\link{txinids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/txinids.Rd b/man/txinids.Rd new file mode 100644 index 0000000..74f1f6a --- /dev/null +++ b/man/txinids.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{txinids} +\alias{txinids} +\title{Retrieving the input transaction IDs} +\usage{ +txinids(con, txid) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{txid}{\code{character}, the id of the transaction.} +} +\value{ +\code{data.frame}, the transaction ID(s) and +the position(s) of the previous UTXO(s). +} +\description{ +This function returns the transaction IDs of the inputs for +a given transaction. +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{intRangePeriod}}, \code{\link{timeofblock}}, + \code{\link{txfee}}, \code{\link{txids}}, + \code{\link{txstats}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/txstats.Rd b/man/txstats.Rd new file mode 100644 index 0000000..052dbb8 --- /dev/null +++ b/man/txstats.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{txstats} +\alias{txstats} +\title{Statistics of a transaction} +\usage{ +txstats(con, txid) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{txid}{\code{character}, the id of the transaction.} +} +\value{ +\code{data.frame} +} +\description{ +This function returns key statistics/characteristics of +a transaction. +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{intRangePeriod}}, \code{\link{timeofblock}}, + \code{\link{txfee}}, \code{\link{txids}}, + \code{\link{txinids}}, \code{\link{utxoage}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/utxoage.Rd b/man/utxoage.Rd new file mode 100644 index 0000000..de795aa --- /dev/null +++ b/man/utxoage.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{utxoage} +\alias{utxoage} +\title{Age of UTXOs} +\usage{ +utxoage(con, txid, units = c("auto", "secs", "mins", "hours", "days", + "weeks")) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{txid}{\code{character}, the id of the transaction.} + +\item{units}{\code{character}, the time difference units; +passed to \code{difftime()}.} +} +\value{ +\code{difftime} +} +\description{ +This function returns a \code{difftime} object measuring the elapsed time(s) +between the UTXO(s) in a transaction and its input(s) (previous UTXO(s)). +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{intRangePeriod}}, \code{\link{timeofblock}}, + \code{\link{txfee}}, \code{\link{txids}}, + \code{\link{txinids}}, \code{\link{txstats}}, + \code{\link{utxovalue}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/utxovalue.Rd b/man/utxovalue.Rd new file mode 100644 index 0000000..a993826 --- /dev/null +++ b/man/utxovalue.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{utxovalue} +\alias{utxovalue} +\title{Retrieving values of UTXOs} +\usage{ +utxovalue(con, txid) +} +\arguments{ +\item{con}{\code{CONRPC}, configuration object.} + +\item{txid}{\code{character}, the id of the transaction.} +} +\value{ +\code{numeric} +} +\description{ +This function returns the values of UTXO(s) in a transaction. +} +\seealso{ +Other UtilityFuncs: \code{\link{blockattime}}, + \code{\link{blockstats}}, \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}}, + \code{\link{intRangePeriod}}, \code{\link{timeofblock}}, + \code{\link{txfee}}, \code{\link{txids}}, + \code{\link{txinids}}, \code{\link{txstats}}, + \code{\link{utxoage}} +} +\author{ +Bernhard Pfaff +} +\concept{UtilityFuncs} diff --git a/man/validBtcAdr.Rd b/man/validBtcAdr.Rd index 71fe7d7..018f597 100644 --- a/man/validBtcAdr.Rd +++ b/man/validBtcAdr.Rd @@ -33,3 +33,4 @@ Other BtcAdresses: \code{\link{BTCADR-class}}, \author{ Bernhard Pfaff } +\concept{BtcAdresses} diff --git a/man/verifychain.Rd b/man/verifychain.Rd index 4c5b296..fdcc61a 100644 --- a/man/verifychain.Rd +++ b/man/verifychain.Rd @@ -4,10 +4,10 @@ \alias{verifychain} \title{RPC-JSON API: verifychain} \usage{ -verifychain(obj, checklevel = NULL, nblocks = NULL) +verifychain(con, checklevel = NULL, nblocks = NULL) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{checklevel}{\code{integer} (optional, 0-4, default=3), how thorough the block verification is.a json array of txids to filter.} @@ -26,7 +26,8 @@ Verifies blockchain database. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -46,3 +47,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs} diff --git a/man/verifytxoutproof.Rd b/man/verifytxoutproof.Rd index 107be21..7e88af2 100644 --- a/man/verifytxoutproof.Rd +++ b/man/verifytxoutproof.Rd @@ -4,10 +4,10 @@ \alias{verifytxoutproof} \title{RPC-JSON API: verifytxoutproof} \usage{ -verifytxoutproof(obj, proof) +verifytxoutproof(con, proof) } \arguments{ -\item{obj}{object of class \code{CONRPC}.} +\item{con}{object of class \code{CONRPC}.} \item{proof}{\code{character} the hex-encoded proof generated by gettxoutproof.} @@ -25,7 +25,8 @@ RPC error if the block is not in our best chain. \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} } \seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, +Other Blockchain RPCs: \code{\link{decodescript}}, + \code{\link{getbestblockhash}}, \code{\link{getblockchaininfo}}, \code{\link{getblockcount}}, \code{\link{getblockhash}}, \code{\link{getblockheader}}, \code{\link{getblock}}, @@ -44,3 +45,4 @@ Other Blockchain RPCs: \code{\link{getbestblockhash}}, \author{ Bernhard Pfaff } +\concept{Blockchain RPCs}