diff --git a/DESCRIPTION b/DESCRIPTION index cd0e8fa..d9389b5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,15 @@ -Package: rbtc -Title: Bitcoin API -Version: 0.1-1 -Authors@R: person("Bernhard", "Pfaff", email = "bernhard@pfaffikus.de", role = c("aut", "cre")) -Description: Implementation of the RPC-JSON API for Bitcoin. -Depends: R (>= 3.4.3) -License: GPL-3 -Encoding: UTF-8 -LazyData: true -RoxygenNote: 6.0.1 -Imports: methods, - rjson, - httr +Package: rbtc +Title: Bitcoin API +Version: 0.1-3 +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 +Imports: methods, rjson, httr, openssl, gmp +NeedsCompilation: no +Packaged: 2018-08-14 14:50:15 UTC; pfaffb +Author: Bernhard Pfaff [aut, cre] +Maintainer: Bernhard Pfaff diff --git a/NAMESPACE b/NAMESPACE index 775d7cb..4769936 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,50 +1,81 @@ -# Generated by roxygen2: do not edit by hand - -export(addnode) -export(clearbanned) -export(conrpc) -export(decoderawtransaction) -export(disconnectnode) -export(getaddednodeinfo) -export(getbestblockhash) -export(getblock) -export(getblockchaininfo) -export(getblockcount) -export(getblockhash) -export(getblockheader) -export(getchaintips) -export(getchaintxstats) -export(getconnectioncount) -export(getdifficulty) -export(gethelp) -export(getinfo) -export(getmempoolancestors) -export(getmempooldescendants) -export(getmempoolentry) -export(getmempoolinfo) -export(getnettotals) -export(getnetworkinfo) -export(getpeerinfo) -export(getrawmempool) -export(getrawtransaction) -export(gettxout) -export(gettxoutproof) -export(gettxoutsetinfo) -export(getwalletinfo) -export(listbanned) -export(ping) -export(preciousblock) -export(pruneblockchain) -export(rpcpost) -export(setnetworkactive) -export(startbtc) -export(stopbtc) -export(verifychain) -export(verifytxoutproof) -exportClasses(ANSRPC) -exportClasses(CONRPC) -exportClasses(NullOrCharacter) -exportClasses(NullOrInteger) -import(httr) -import(methods) -import(rjson) +# Generated by roxygen2: do not edit by hand + +export(PrivKey2PubKey) +export(PrivKey2Wif) +export(PubHash2BtcAdr) +export(PubKey2PubHash) +export(Wif2PrivKey) +export(addnode) +export(base58CheckDecode) +export(base58CheckEncode) +export(clearbanned) +export(concatHex) +export(conrpc) +export(containsPoint) +export(createBtcAdr) +export(createPrivateKey) +export(date2int) +export(decodeHex) +export(decoderawtransaction) +export(disconnectnode) +export(doubleUp) +export(ecparam) +export(ecpoint) +export(getaddednodeinfo) +export(getbestblockhash) +export(getblock) +export(getblockchaininfo) +export(getblockcount) +export(getblockhash) +export(getblockheader) +export(getchaintips) +export(getchaintxstats) +export(getconnectioncount) +export(getdifficulty) +export(gethelp) +export(getinfo) +export(getmempoolancestors) +export(getmempooldescendants) +export(getmempoolentry) +export(getmempoolinfo) +export(getnettotals) +export(getnetworkinfo) +export(getpeerinfo) +export(getrawmempool) +export(getrawtransaction) +export(gettxout) +export(gettxoutproof) +export(gettxoutsetinfo) +export(getwalletinfo) +export(hash160) +export(hash256) +export(int2date) +export(intMaxDay) +export(intMinDay) +export(intRangeDay) +export(intRangePeriod) +export(isNull) +export(listbanned) +export(ping) +export(preciousblock) +export(pruneblockchain) +export(rpcpost) +export(setnetworkactive) +export(startbtc) +export(stopbtc) +export(validBtcAdr) +export(verifychain) +export(verifytxoutproof) +exportClasses(ANSRPC) +exportClasses(BTCADR) +exportClasses(CONRPC) +exportClasses(ECPARAM) +exportClasses(ECPOINT) +exportClasses(EcparamOrNull) +exportClasses(NullOrCharacter) +exportClasses(NullOrInteger) +import(gmp) +import(httr) +import(methods) +import(openssl) +import(rjson) diff --git a/R/AllClasses.R b/R/AllClasses.R index 2e1b0db..9ccd8ec 100644 --- a/R/AllClasses.R +++ b/R/AllClasses.R @@ -11,7 +11,6 @@ #' @name CONRPC-class #' @rdname CONRPC-class #' @export -#' @author Bernhard Pfaff setClass("CONRPC", representation = list( rpcuse = "character", rpcpwd = "character", @@ -39,8 +38,9 @@ setClassUnion(name = "NullOrCharacter", #' @export setClassUnion(name = "NullOrInteger", members = c("integer", "NULL")) -#' The ANSRPC class +#' @title The ANSRPC class #' +#' @description #' This class definition is employed to cast the JSON-objects #' returned by API-calls to bitcoind. #' @@ -63,6 +63,256 @@ setClass("ANSRPC", representation = list( emessage = "NullOrCharacter", id = "character") ) +#' @title The ECPARAM class +#' +#' @description +#' S4-class for elliptic curve parameters. +#' Objects of this class do contain the big integer parameters of +#' elliptic curves. Instances of this class are ordinarily created +#' by a call to \code{exparam} +#' +#' @slot p \code{bigz}, curve dimension. +#' @slot a \code{bigz}, parameter. +#' @slot b \code{bigz}, parameter. +#' +#' @family EllipticCurve +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @author Bernhard Pfaff +#' @name ECPARAM-class +#' @rdname ECPARAM-class +#' @export +setClass("ECPARAM", representation = list( + p = "bigz", + a = "bigz", + b = "bigz")) +#' @title S4 Class Union ECPARAM or NULL +#' +#' @description +#' S4-class union of \code{NULL} or \code{ECPARAM}. +#' +#' @family EllipticCurve +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @author Bernhard Pfaff +#' @name EcparamOrNull-class +#' @rdname EcparamOrNull-class +#' @export +setClassUnion(name = "EcparamOrNull", + members = c("ECPARAM", "NULL")) + +#' @title S4 Class ECPOINT +#' +#' @description +#' S4-class for a point on an elliptic curve. +#' Ordinarily, objects are created by calling +#' \code{ecpoint}. +#' +#' @slot ecparam \code{ECPARAM} +#' @slot x \code{bigz} +#' @slot y \code{bigz} +#' @slot r \code{bigz} +#' +#' @family EllipticCurve +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @author Bernhard Pfaff +#' @name ECPOINT-class +#' @rdname ECPOINT-class +#' @export +setClass("ECPOINT", representation = list( + ecparam = "EcparamOrNull", + x = "bigz", + y = "bigz", + r = "bigz")) + +#' Validate S4-class BTCADR +#' +#' This function validates objects of S4-class +#' \code{BTCADR}. Hereby, checks are conducted +#' with respect to the first character of the addresses; +#' their consistency with the net version and +#' the correspondence of the checksums. +#' +#' @param object \code{BTCADR} object +#' +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name validBtcAdr +#' @rdname validBtcAdr +#' @export +validBtcAdr <- function(object){ + errors <- character() + s <- unlist(strsplit("0123456789ABCDEF", "")) + # checks for private key + lprivkey <- nchar(object@privkey) + if (!identical(lprivkey, 64L)){ + msg <- paste0("Private key must have 64 characters in total,\n", + "but contains ", + lprivkey, + ".\n") + errors <- c(errors, msg) + } + cprivkey <- all(sapply(unlist(strsplit(object@privkey, "")), + function(x) x %in% s) + ) + if (!cprivkey){ + msg <- paste0("Private key must only contain the symbols:\n", + "'0123456789ABCDEF'\n") + errors <- c(errors, msg) + } + pk <- Wif2PrivKey(object@wif) + if (!identical(pk, object@privkey)){ + msg <- paste0("Private key and WIF do not coincice.") + errors <- c(errors, msg) + } + # checks for 1st character in WIF PubHash & BtcAdr + fcwif <- substr(object@wif, 1, 1) + fcpubhash <- substr(object@pubhash, 1, 2) + fcbtcadr <- substr(object@btcadr, 1, 1) + if (object@mainnet){ + check1st <- identical(fcwif, "5") + if (!check1st){ + msg <- paste0("WIF must start with '5' for mainnet.\n") + errors <- c(errors, msg) + } + check1st <- identical(fcpubhash, "00") + if (!check1st){ + msg <- paste0("Hashed public key must start with '00'\n", + "for mainnet.\n") + errors <- c(errors, msg) + } + check1st <- identical(fcbtcadr, "1") + if (!check1st){ + msg <- paste0("BTC address must start with '1'\n", + "for mainnet.\n") + errors <- c(errors, msg) + } + } else { + check1st <- identical(fcwif, "9") + if (!check1st){ + msg <- paste0("WIF must start with '9'\n", + "for testnet.\n") + errors <- c(errors, msg) + } + check1st <- identical(fcpubhash, "6F") + if (!check1st){ + msg <- paste0("Hashed public key must start with '6F'\n", + "for testnet.\n") + errors <- c(errors, msg) + } + check1st <- (fcbtcadr == "n") || (fcbtcadr == "m") + if (!check1st){ + msg <- paste0("BTC address must start with 'n/m'\n", + "for testnet.\n") + errors <- c(errors, msg) + } + } + # checks on WIF + lwif <- nchar(object@wif) + if (!identical(lwif, 51L)){ + msg <- paste0("WIF must have 51 characters in total,\n", + "but contains ", + lwif, + ".\n") + errors <- c(errors, msg) + } + wifd <- base58CheckDecode(object@wif) + n <- length(wifd) - 4L + checksum1 <- utils::tail(wifd, 4) + wiff <- wifd[1:n] + wifh <- hash256(wiff) + checksum2 <- wifh[1:4] + if (!all(checksum1 == checksum2)){ + msg <- paste0("WIF checksum checking error.\n") + errors <- c(errors, msg) + } + wifnet <- as.character(wifd[1]) + if (object@mainnet){ + if (!identical(wifnet, "80")){ + msg <- paste0("WIF ist not compliant with mainnet.\n") + errors <- c(errors, msg) + } + } else { + if (!identical(wifnet, "ef")){ + msg <- paste0("WIF ist not compliant with testnet.\n") + errors <- c(errors, msg) + } + } + # checks on public key + fcpubkey <- substr(object@pubkey, 1, 2) + if (!identical(fcpubkey, "04")){ + msg <- paste0("512-bit public key must start with '04'.\n") + errors <- c(errors, msg) + } + cpubkey <- all(sapply(unlist(strsplit(object@pubkey, "")), + function(x) x %in% s) + ) + if (!cpubkey){ + msg <- paste0("512-bit public key must only contain the symbols:\n", + "'0123456789ABCDEF'\n") + errors <- c(errors, msg) + } + lpubkey <- length(decodeHex(object@pubkey)[-1]) + if (!identical(lpubkey, 64L)){ + msg <- paste0("Public key must be 65 byte long:\n", + "leading byte, 32 bytes x- and 32-bytes y.\n") + errors <- c(errors, msg) + } + # checks on public hash + lpubhash <- nchar(object@pubhash) + if (!identical(lpubhash, 50L)){ + msg <- paste0("Hash of public key must be 50 characters long.\n") + errors <- c(errors, msg) + } + cpubhash <- all(sapply(unlist(strsplit(object@pubhash, "")), + function(x) x %in% s) + ) + if (!cpubhash){ + msg <- paste0("Hash of public key must only contain the symbols:\n", + "'0123456789ABCDEF'\n") + errors <- c(errors, msg) + } + # checks on BTC address + lbtcadr <- nchar(object@btcadr) - 1L + if ( (lbtcadr < 25) || (lbtcadr > 33)){ + msg <- paste0("BTC address must contain 25-33 symbols\n", + "excluding leading byte (1 or n/m).\n") + errors <- c(errors, msg) + } + # return validation result + if (length(errors) == 0L){ + return(TRUE) + } else { + return(cat(errors)) + } +} +#' @title S4 class BTCADR +#' +#' @description +#' S4-class for BTC addresses, ordinarily created +#' by a call to \code{createBtcAdr()}. +#' +#' @slot privkey \code{character}, the private key. +#' @slot wif \code{character}, the WIF. +#' @slot pubkey \code{character}, the 512-bit public key. +#' @slot pubhash \code{character}, the hashed public key. +#' @slot btcadr \code{character}, the BTC address. +#' @slot mainnet \code{logical}, whether mainnet or testnet. +#' +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name BTCADR-class +#' @rdname BTCADR-class +#' @export +setClass("BTCADR", + representation = list( + privkey = "character", + wif = "character", + pubkey = "character", + pubhash = "character", + btcadr = "character", + mainnet = "logical"), + validity = validBtcAdr) #' @title show-methods #' #' @description Defined \code{show}-methods for S4-classes. @@ -91,3 +341,33 @@ setMethod("show", signature = "ANSRPC", cat(paste("Error codemessage:\n", object@emessage, "\n")) } }) +#' @rdname show-methods +#' @aliases show,BTCADR-method +setMethod("show", signature = "BTCADR", + definition = function(object){ + net <- "Testnet" + if (object@mainnet){ + net <- "Mainnet" + } + cat(paste(net, + "bitcoin addresses:\n")) + cat(paste("Private key:\n", + object@privkey, "\n")) + cat(paste("Wallet import format:\n", + object@wif, "\n")) + cat(paste("512-bit public key:\n", + object@pubkey, "\n")) + cat(paste("Hashed public key:\n", + object@pubhash, "\n")) + cat(paste("BTC address:\n", + object@btcadr, "\n")) +}) +#' @rdname show-methods +#' @aliases show,ECPARAM-method +setMethod("show", signature = "ECPARAM", + definition = function(object){ + cat("Curve parameters (in hex):\n") + cat(paste("p:", as.character(object@p, b = 16), "\n")) + cat(paste("a:", as.character(object@a, b = 16), "\n")) + cat(paste("b:", as.character(object@b, b = 16), "\n")) +}) diff --git a/R/AllImports.R b/R/AllImports.R new file mode 100644 index 0000000..187e5d7 --- /dev/null +++ b/R/AllImports.R @@ -0,0 +1,10 @@ +#' @import methods +NULL +#' @import openssl +NULL +#' @import gmp +NULL +#' @import rjson +NULL +#' @import httr +NULL diff --git a/R/BtcAddresses.R b/R/BtcAddresses.R new file mode 100644 index 0000000..2e4342d --- /dev/null +++ b/R/BtcAddresses.R @@ -0,0 +1,407 @@ +#' Creation of a private key +#' +#' Returns a random 256-bit private key in hex notation. +#' +#' @return \code{character}. +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +#' \url{https://en.bitcoin.it/wiki/Address} +#' @name createPrivateKey +#' @aliases createPrivateKey +#' @rdname createPrivateKey +#' @examples +#' createPrivateKey() +#' @export +createPrivateKey <- function(){ + s <- "0123456789ABCDEF" + idx <- sample(1:16, 64, replace = TRUE) + pk <- sapply(idx, function(x) substr(s, x, x)) + pk <- paste(pk, collapse = "") + pk +} +#' Create WIF from a private key +#' +#' Returns the corresponding WIF key from a private key +#' +#' @param privkey \code{character}, a private key. +#' @param mainnet \code{logical}, whether the WIF should correspond +#' to the mainnet or testnet. +#' +#' @return \code{character}, the WIF key +#' +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +#' \url{https://en.bitcoin.it/wiki/Address} +#' @name PrivKey2Wif +#' @aliases PrivKey2Wif +#' @rdname PrivKey2Wif +#' @examples +#' pk <- createPrivateKey() +#' PrivKey2Wif(pk) +#' @export +PrivKey2Wif <- function(privkey, mainnet = TRUE){ + if (mainnet){ + pke <- paste0("80", privkey) + } else { + pke <- paste0("EF", privkey) + } + privkeyext <- decodeHex(pke) + privkeyexth <- hash256(privkeyext) + checksum <- privkeyexth[1:4] + privkeyextcs <- c(privkeyext, checksum) + base58CheckEncode(privkeyextcs) +} +#' Create private key from WIF +#' +#' Returns the corresponding private key from a WIF key. +#' +#' @param wif \code{character}, a WIF key. +#' +#' @return \code{character}, the corresponding private key. +#' +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +#' \url{https://en.bitcoin.it/wiki/Address} +#' @name Wif2PrivKey +#' @aliases Wif2PrivKey +#' @rdname Wif2PrivKey +#' @examples +#' pk1 <- createPrivateKey() +#' wif <- PrivKey2Wif(pk1) +#' pk2 <- Wif2PrivKey(wif) +#' identical(pk1, pk2) +#' @export +Wif2PrivKey <- function(wif){ + fc <- substr(wif, 1, 1) + if (!(fc %in% c("5", "9"))){ + msg <- paste0("First character in WIF does neither\n", + "correspond to mainnet nor testnet.\n") + stop(msg) + } + if (!identical(nchar(wif), 51L)){ + stop("WIF must have a length of 51 characters.\n") + } + bytestring <- base58CheckDecode(wif) + n <- length(bytestring) - 4L + bytestringshort <- bytestring[1:n] + privkey <- bytestringshort[-1] + toupper(paste0(privkey, collapse = "")) +} +#' Create public key from private key +#' +#' This function creates the 512-bit public key corresponding +#' to a private key. +#' +#' @param privkey \code{character}, the private key. +#' @param mainnet \code{logical}, whether the WIF should correspond +#' to the mainnet or testnet. +#' +#' @return \code{character}, the public key. +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name PrivKey2PubKey +#' @aliases PrivKey2PubKey +#' @rdname PrivKey2PubKey +#' @export +PrivKey2PubKey <- function(privkey, mainnet = TRUE){ + pk <- paste0("0x", privkey, collapse = "") + pk <- gmp::as.bigz(pk) + p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F" + b <- "0x0000000000000000000000000000000000000000000000000000000000000007" + a <- "0x0000000000000000000000000000000000000000000000000000000000000000" + r <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141" + Gx <- "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798" + Gy <- "0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8" + ec <- ecparam(p, a, b) + g <- ecpoint(ec, gmp::as.bigz(Gx), gmp::as.bigz(Gy), gmp::as.bigz(r)) + ans <- g * pk + x <- as.character(ans@x, b = 16) + y <- as.character(ans@y, b = 16) + toupper(paste0("04", x, y, collapse = "")) +} +#' Create public key hash from 512-bit public key +#' +#' This function returns the associated public key hash +#' from a 512-bit public key by using the \code{hash160()} function. +#' +#' @param pubkey \code{character}, the public key. +#' @param mainnet \code{logical}, whether the WIF should correspond +#' to the mainnet or testnet. +#' +#' @return \code{character}, the hash of a public key +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name PubKey2PubHash +#' @aliases PubKey2PubHash +#' @rdname PubKey2PubHash +#' @export +PubKey2PubHash <- function(pubkey, mainnet = TRUE){ + pubkey160 <- hash160(decodeHex(pubkey)) + checksum <- pubkey160[1:4] + if (mainnet){ + pubkey160ext <- c(decodeHex("00"), pubkey160) + } else { + pubkey160ext <- c(decodeHex("6f"), pubkey160) + } + pubkey160extcs <- c(pubkey160ext, checksum) + toupper(paste0(pubkey160extcs, + collapse = "") + ) +} +#' Create BTC address from public key hash +#' +#' This function returns the corresponding BTC address from a +#' hashed public key. +#' +#' @param pubhash \code{character}, the public key hash. +#' +#' @return \code{character}, the BTC address +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name PubHash2BtcAdr +#' @aliases PubHash2BtcAdr +#' @rdname PubHash2BtcAdr +#' @export +PubHash2BtcAdr <- function(pubhash){ + pubhashhex <- decodeHex(pubhash) + base58CheckEncode(pubhashhex) +} +#' Create BTC addresses +#' +#' This function creates an object of S4-class \code{BTCADR}. +#' +#' @param privkey \code{character}, a private key. +#' @param mainnet \code{logical}, for which net the keys should belong to. +#' +#' @return Object of S4-class \code{BTCADR} +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name createBtcAdr +#' @aliases createBtcAdr +#' @rdname createBtcAdr +#' @export +createBtcAdr <- function(privkey, mainnet = TRUE){ + pk <- sapply(seq(1, nchar(privkey), by = 2), + function(x) substr(privkey, x, x + 1)) + if (mainnet){ + pke <- c("80", pk) + } else { + pke <- c("ef", pk) + } + pke <- as.raw(strtoi(pke, base = 16L)) + h <- hash256(pke) + checksum <- h[1:4] + pkecs <- c(pke, checksum) + wif <- base58CheckEncode(pkecs) + pubkey <- PrivKey2PubKey(privkey) + pub160 <- hash160(decodeHex(pubkey)) + cs <- pub160[1:4] + if (mainnet){ + pub160e <- c(decodeHex("00"), pub160) + } else { + pub160e <- c(decodeHex("6f"), pub160) + } + pubhash <- c(pub160e, cs) + btcadr <- base58CheckEncode(pubhash) + new("BTCADR", + privkey = privkey, + wif = wif, + pubkey = pubkey, + pubhash = toupper(paste(pubhash, collapse = "")), + btcadr = btcadr, + mainnet = mainnet) +} +#' Decoding of a hex string +#' +#' This function converts a hex string,, whereby the string must not +#' contain the \code{0x} prefix, to a \code{list} object with the associated +#' integers as its elements. +#' +#' @param s \code{character}, the hex string. +#' +#' @return \code{list} +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +#' \url{https://en.bitcoin.it/wiki/Address} +#' @name decodeHex +#' @aliases decodeHex +#' @rdname decodeHex +#' @examples +#' pk <- createPrivateKey() +#' decodeHex(pk) +#' @export +decodeHex <- function(s){ + h <- sapply(seq(1, nchar(s), by = 2), function(x) substr(s, x, x + 1)) + ans <- as.raw(strtoi(h, base = 16L)) + ans +} +#' Concatenate two hex strings +#' +#' This function concatenates two hex strings, provided without the \code{0x} prefix, +#' and returns a \code{list} object of the associated +#' integers. +#' +#' @param hex1 \code{character}, a hex string. +#' @param hex2 \code{character}, a hex string. +#' @return \code{list} +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +#' \url{https://en.bitcoin.it/wiki/Address} +#' @name concatHex +#' @aliases concatHex +#' @rdname concatHex +#' @examples +#' h1 <- "80" +#' h2 <- createPrivateKey() +#' concatHex(h1, h2) +#' @export +concatHex <- function(hex1, hex2){ + h1 <- decodeHex(hex1) + h2 <- decodeHex(hex2) + ans <- c(h1, h2) + ans +} +#' Base 58 binary-to-text-encoding +#' +#' This is a modified binary-to-text encoding used +#' for encoding Bitcoin addresses, aka \emph{Base58Check}. +#' If this is applied to an extended private key with its trailing +#' check sum, then the result is the \emph{Wallet Import Format}, +#' (WIF). +#' +#' @param x \code{character}, string in hex format. +#' +#' @return \code{character}, the encoded string. +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +#' \url{https://en.bitcoin.it/wiki/Address},\cr +#' \url{https://en.bitcoin.it/wiki/Base58Check_encoding} +#' @name base58CheckEncode +#' @aliases base58CheckEncode +#' @rdname base58CheckEncode +#' @export +base58CheckEncode <- function(x){ + b58 <- "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" + zerohex <- as.raw(strtoi("", base = 16L)) + countzero <- which(x == zerohex) + xchar <- paste0("0x", paste(x, collapse = "")) + ben <- gmp::as.bigz(xchar) + ans <- "" + while (ben > 0){ + idx <- ben %% 58L ## remainder + ans <- paste0(substr(b58, idx + 1, idx + 1), ans) ## reverse order + ben <- ben %/% 58L + } + if (length(countzero) > 0){ + ans <- paste(c(rep("1", countzero), ans), collapse = "") + } + ans +} +#' Base 58 binary-to-text-decoding +#' +#' This is a modified binary-to-text decoding used +#' for decoding Bitcoin addresses, aka \emph{Base58Check}. +#' If this is applied to a WIF address and the first and last four +#' bytes are dropped, the result is the corresponding private key. +#' +#' @param x \code{character}, string in hex format. +#' +#' @return \code{list}, the decoded elements of the string. +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +#' \url{https://en.bitcoin.it/wiki/Address},\cr +#' \url{https://en.bitcoin.it/wiki/Base58Check_encoding} +#' @name base58CheckDecode +#' @aliases base58CheckDecode +#' @rdname base58CheckDecode +#' @export +base58CheckDecode <- function(x){ + b58 <- "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" + b58v <- unlist(strsplit(b58, "")) + xv <- unlist(strsplit(x, "")) + ben <- 0L # big endian number + for (i in 1:nchar(x)){ + ## index starts at 1 not 0 + ben <- gmp::as.bigz(ben * 58L + which(b58v == xv[i]) - 1.0) + } + shex <- "" + while (ben > 0){ + ben %% 256L + h <- as.integer(ben %% 256L) + class(h) <- "hexmode" + h <- format(h, width = 2) + shex <- paste0(h, shex) + ben <- gmp::as.bigz(ben %/% 256L) + } + decodeHex(shex) +} +#' BTC hash256 +#' +#' This function returns the hash by applying the \code{sha256} hashing +#' algorithm twice to a \code{raw} object. +#' +#' @param d \code{raw}, vector. +#' +#' @return \code{character}, the value of \code{d} hashed twice. +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name hash256 +#' @aliases hash256 +#' @rdname hash256 +#' @export +hash256 <- function(d){ + if (!identical(class(d), "raw")){ + msg <- paste0("Object 'd' is not of class raw.", + "\n", + "Trying to coerce from character.\n") + warning(msg) + d <- as.raw(strtoi(d, base = 16L)) + } + d1 <- openssl::sha256(d) + d1 <- decodeHex(paste(d1, collapse = ":")) + d2 <- openssl::sha256(d1) + d2 <- decodeHex(paste(d2, collapse = ":")) + d2 +} +#' BTC hash160 +#' +#' This function returns the hash by applying the \code{sha256} hashing +#' first and then to the resulting hash the \code{ripemd160} algorithm. +#' +#' @param d \code{raw}, vector. +#' +#' @return \code{character}, the value of \code{d} hashed with +#' \code{sha256} and \code{ripemd160}. +#' @family BtcAdresses +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Address} +#' @name hash160 +#' @aliases hash160 +#' @rdname hash160 +#' @export +hash160 <- function(d){ + if (!identical(class(d), "raw")){ + msg <- paste0("Object 'd' is not of class raw.", + "\n", + "Trying to coerce from character.\n") + warning(msg) + d <- as.raw(strtoi(d, base = 16L)) + } + d1 <- openssl::sha256(d) + d1 <- decodeHex(paste(d1, collapse = ":")) + d2 <- openssl::ripemd160(d1) + d2 <- decodeHex(paste(d2, collapse = ":")) + d2 +} diff --git a/R/EllipticCurves.R b/R/EllipticCurves.R new file mode 100644 index 0000000..0195d2e --- /dev/null +++ b/R/EllipticCurves.R @@ -0,0 +1,288 @@ +#' Creating objects of class ECPARAM +#' +#' This function returns an object of S4-class \code{ECPARAM}, +#' that does contain the parametrization of an elliptic curve. +#' +#' @param p \code{integer} +#' @param a \code{integer} +#' @param b \code{integer} +#' +#' @return An object of S4-class \code{ECPARAM} +#' @family EllipticCurve +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @name ecparam +#' @rdname ecparam +#' @examples +#' p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F" +#' b <- "0x0000000000000000000000000000000000000000000000000000000000000007" +#' a <- "0x0000000000000000000000000000000000000000000000000000000000000000" +#' curve256 <- ecparam(p, a, b) +#' curve256 +#' @export +ecparam <- function(p, a, b){ + p <- gmp::as.bigz(p) + a <- gmp::as.bigz(a) + b <- gmp::as.bigz(b) + new("ECPARAM", p = p, a = a, b = b) +} +#' @title containsPoint-methods +#' +#' @description Checks whether a point is on a defined ellipctic curve. +#' +#' @param curve an S4-object of class \code{ECPARAM}. +#' @param x an S4-object of class \code{bigz}, the x-coordinate. +#' @param y an S4-object of class \code{bigz}, the y-coordinate. +#' +#' @return \code{logical} +#' +#' @family EllipticCurve +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @name containsPoint +#' @aliases containsPoint +#' @docType methods +#' @rdname containsPoint-methods +#' @examples +#' p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F" +#' b <- "0x0000000000000000000000000000000000000000000000000000000000000007" +#' a <- "0x0000000000000000000000000000000000000000000000000000000000000000" +#' curve256 <- ecparam(p, a, b) +#' Gx <- "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798" +#' Gy <- "0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8" +#' containsPoint(curve256, Gx, Gy) +#' @export +setGeneric("containsPoint", + function(curve, x, y) standardGeneric("containsPoint")) + +#' @rdname containsPoint-methods +#' @aliases containsPoint,ECPARAM,bigz,bigz-method +setMethod("containsPoint", signature("ECPARAM", "bigz", "bigz"), + definition = function(curve, x, y){ + term <- (y * y - (x * x * x + curve@a * x + curve@b)) %% curve@p + term == 0L + }) +#' @rdname containsPoint-methods +#' @aliases containsPoint,ECPARAM,integer,integer-method +setMethod("containsPoint", signature("ECPARAM", "integer", "integer"), + definition = function(curve, x, y){ + x <- gmp::as.bigz(x) + y <- gmp::as.bigz(y) + term <- (y * y - (x * x * x + curve@a * x + curve@b)) %% curve@p + term == 0L + }) +#' @rdname containsPoint-methods +#' @aliases containsPoint,ECPARAM,character,character-method +setMethod("containsPoint", signature("ECPARAM", "character", "character"), + definition = function(curve, x, y){ + x <- gmp::as.bigz(x) + y <- gmp::as.bigz(y) + term <- (y * y - (x * x * x + curve@a * x + curve@b)) %% curve@p + term == 0L + }) +#' Creating objects of class ECPOINT +#' +#' This function returns an object of S4-class \code{ECPOINT}, +#' that does represent a point on an elliptic curve. +#' +#' @param ecparam \code{integerECPARAM} +#' @param x x-coordinate, to be coercible to \code{bigz}. +#' @param y y-coordinate, to be coercible to \code{bigz}. +#' @param r the order of the base point. +#' +#' @return An object of S4-class \code{ECPOINT} +#' @family EllipticCurve +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @name ecpoint +#' @rdname ecpoint +#' @examples +#' p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F" +#' b <- "0x0000000000000000000000000000000000000000000000000000000000000007" +#' a <- "0x0000000000000000000000000000000000000000000000000000000000000000" +#' r <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141" +#' x <- "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798" +#' y <- "0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8" +#' curve256 <- ecparam(p, a, b) +#' ecp <- ecpoint(curve256, x, y, r) +#' ecp +#' @export +ecpoint <- function(ecparam = NULL, x, y, r = NULL){ + x <- gmp::as.bigz(x) + y <- gmp::as.bigz(y) + r <- gmp::as.bigz(r) + if (!is.null(ecparam)){ + checkpoint <- containsPoint(ecparam, x, y) + } else { + checkpoint <- TRUE + } + if (!checkpoint){ + stop("Point (x, y) is not on elliptic curve.\n") + } + new("ECPOINT", ecparam = ecparam, x = x, y = y, r = r) +} +#' @title Test for empty EC point +#' +#' @description Checks whether an EC point does exist. +#' +#' @param x object +#' +#' @return \code{logical} +#' +#' @family EllipticCurve +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @name isNull +#' @aliases isNull +#' @docType methods +#' @rdname isNull-methods +#' @export +setGeneric("isNull", function(x) standardGeneric("isNull")) +#' @rdname isNull-methods +#' @aliases isNull,ECPOINT-method +setMethod("isNull", signature = "ECPOINT", function(x){ + ans <- length(x@x) == 0L & length(x@y) == 0L + ans + } +) +#' @title Elliptic curve operators +#' +#' @param x integer +#' @param y integer +#' @param ecp point on elliptic curve +#' @param e1 point on elliptic curve, or integer +#' @param e2 point on elliptic curve, or integer +#' +#' @description The following operarations for EC points +#' are available: +#' \itemize{ +#' \item{doubleUp}{multiplying a point by itself} +#' \item{+}{point addition} +#' \item{leftmostBit}{highest bit value of an integer} +#' \item{AND}{logical and-operator for two integers} +#' \item{*}{multiplication of an integer scalar with an EC point} +#' } +#' @family EllipticCurve +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Secp256k1} +#' @name ecoperators +#' @rdname ecoperators-methods +#' @aliases doubleUp +#' @docType methods +#' @export +setGeneric("doubleUp", function(ecp) standardGeneric("doubleUp")) +#' @rdname ecoperators-methods +#' @aliases doubleUp,ECPOINT-method +setMethod("doubleUp", signature = "ECPOINT", function(ecp){ + if (isNull(ecp)){ + return(ecpoint(NULL, NULL, NULL)) + } + p <- ecp@ecparam@p + a <- ecp@ecparam@a + l <- ( (3 * ecp@x * ecp@x + a) * + inv.bigz(2 * ecp@y, p)) %% p + x3 <- (l * l - 2 * ecp@x ) %% p + y3 <- (l * (ecp@x - x3) - ecp@y) %% p + ans <- ecpoint(ecp@ecparam, x3, y3) + ans +}) +#' @rdname ecoperators-methods +#' @aliases +,ECPOINT,ECPOINT-method +setMethod("+", signature = c("ECPOINT", "ECPOINT"), function(e1, e2){ + if (isNull(e2)){ + return(e1) + } + if (isNull(e1)){ + return(e2) + } + if (!identical(e1@ecparam, e2@ecparam)){ + stop("EC parameters of operands not identical.\n") + } + p <- e1@ecparam@p + if (e1@x == e2@x){ + check <- (e1@y + e2@y) %% p + if (check == 0L){ + return(ecpoint(NULL, NULL, NULL)) + } else { + return(doubleUp(e1)) + } + } + l <- ( (e2@y - e1@y) * inv.bigz(e2@x - e1@x, p) ) %% p + x3 <- (l * l - e1@x - e2@x) %% p + y3 <- (l * (e1@x - x3) - e1@y) %% p + ecpoint(e1@ecparam, x3, y3) +}) +#' @rdname ecoperators-methods +#' @aliases leftmostBit +setGeneric("leftmostBit", function(x) standardGeneric("leftmostBit")) +#' @rdname ecoperators-methods +#' @aliases leftmostBit,bigz-method +setMethod("leftmostBit", signature = "bigz", function(x){ + if (x <= 0L){ + stop("Negative 'bigz' integer provided.\n") + } + ans <- as.bigz(1L) + while (ans <= x){ + ans <- 2L * ans + } + as.bigz(ans / 2L) +}) +#' @rdname ecoperators-methods +#' @aliases AND +setGeneric("AND", function(x, y) standardGeneric("AND")) +#' @rdname ecoperators-methods +#' @aliases AND,bigz,bigz-method +setMethod("AND", signature = c("bigz", "bigz"), function(x, y){ + b1 <- as.character(x, b = 2) + b1l <- nchar(b1) + b2 <- as.character(y, b = 2) + b2l <- nchar(b2) + n <- min(b1l, b2l) + b1num <- rev(as.numeric( (unlist(strsplit(b1, ""))))) + b2num <- rev(as.numeric( (unlist(strsplit(b2, ""))))) + ans <- rep(0, n) + for (i in 1:n){ + ans[i] <- ifelse(b1num[i] + b2num[i] > 1, 1, 0) + } + ans <- rev(ans) + ans <- paste("0b", paste0(ans, collapse = ""), sep = "") + as.bigz(ans) +}) +#' @rdname ecoperators-methods +#' @aliases *,ECPOINT,bigz-method +setMethod("*", signature = c("ECPOINT", "bigz"), function(e1, e2){ + ecp <- e1 + e <- e2 + if (isNull(ecp)){ + return(ecp) + } + if (length(ecp@r) > 0){ + e <- e %% ecp@r + } + if ( e == 0L){ + return(ecpoint(NULL, NULL, NULL)) + } + if (e < 0L){ + stop("Negative 'bigz' integer.\n") + } + e3 <- 3L * e + negpoint <- ecpoint(ecp@ecparam, ecp@x, -ecp@y, ecp@r) + i <- as.bigz(leftmostBit(e3) / 2L) + ans <- ecp + while (i > 1){ + ans <- doubleUp(ans) + if ( (AND(e3, i) != 0L) && (AND(e, i) == 0L) ){ + ans <- ans + ecp + } + if ( (AND(e3, i) == 0L) && (AND(e, i) != 0L) ){ + ans <- ans + negpoint + } + i <- as.bigz(i / 2) + } + ans +}) +#' @rdname ecoperators-methods +#' @aliases *,bigz,ECPOINT-method +setMethod("*", signature = c("bigz", "ECPOINT"), function(e1, e2){ + e2 * e1 +}) diff --git a/R/NetworkRpcs.R b/R/NetworkRpcs.R index f168dae..2930938 100644 --- a/R/NetworkRpcs.R +++ b/R/NetworkRpcs.R @@ -235,7 +235,7 @@ disconnectnode <- function(obj, address = NULL, nodeid = NULL){ stop("Either 'address' or 'nodeid' must be provided.\n") } if (!is.null(address) & !is.null(nodeid)){ - warning("Both arguments ('address' and 'nodeid') set, using 'address'.\n") + warning("Arguments 'address' and 'nodeid' provided, using 'address'.\n") address <- as.character(address) pl <- list(address = address) } diff --git a/R/RawTransactions.R b/R/RawTransactions.R new file mode 100644 index 0000000..8291e4c --- /dev/null +++ b/R/RawTransactions.R @@ -0,0 +1,56 @@ +#' RPC-JSON API: getrawtransaction +#' +#' Returns the raw transaction data. +#' +#' @section: Details +#' By default this function only works for mempool transactions. +#' If the -txindex option is enabled, it also works for blockchain transactions. +#' DEPRECATED: for now, it also works for transactions with unspent outputs. +#' If verbose is 'true', returns an object with information about 'txid'. +#' 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 txid \code{character}, the transaction id. +#' @param verbose \code{logical}, type of output. +#' +#' @return A S4-object of class \code{ANSRPC}. +#' @family RawTransactions RPCs +#' @author Bernhard Pfaff +#' @references \url{https://bitcoin.org/en/developer-reference#getblock}, +#' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +#' @name getrawtransaction +#' @aliases getrawtransaction +#' @rdname getrawtransaction +#' @export +getrawtransaction <- function(obj, txid, verbose = FALSE){ + txid <- as.character(txid) + verb <- ifelse(verbose, 1L, 0L) + pl <- list(txid = txid, verbose = verb) + rpcpost(obj, "getrawtransaction", pl) +} + + + +#' RPC-JSON API: decoderawtransaction +#' +#' Return a JSON object representing the serialized, +#' hex-encoded transaction. +#' +#' @param obj object of class \code{CONRPC}. +#' @param hexstring \code{character}, the transaction hex string. +#' +#' @return A S4-object of class \code{ANSRPC}. +#' @family RawTransactions RPCs +#' @author Bernhard Pfaff +#' @references \url{https://bitcoin.org/en/developer-reference#getblock}, +#' \url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +#' @name decoderawtransaction +#' @aliases decoderawtransaction +#' @rdname decoderawtransaction +#' @export +decoderawtransaction <- function(obj, hexstring){ + hexstring <- as.character(hexstring) + pl <- list(hexstring = hexstring) + rpcpost(obj, "decoderawtransaction", pl) +} diff --git a/R/UtilFuncs.R b/R/UtilFuncs.R new file mode 100644 index 0000000..d916895 --- /dev/null +++ b/R/UtilFuncs.R @@ -0,0 +1,143 @@ +#' Convert time stamp to POSIX +#' +#' 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} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @references \url{https://en.bitcoin.it/wiki/Block_timestamp} +#' @name int2date +#' @rdname int2date +#' @examples +#' ts <- 1532954868 +#' int2date(ts) +#' @export +int2date <- function(x){ + x <- abs(as.integer(x)) + ans <- as.POSIXct(x, tz = "GMT", origin = "1970-01-01") + format(ans, "%Y-%m-%d %H:%M:%S") +} +#' Convert date/time to integer +#' +#' 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 +#' @author Bernhard Pfaff +#' @name date2int +#' @rdname date2int +#' @examples +#' d <- "2017-03-15" +#' date2int(d) +#' @export +date2int <- function(x){ + x <- as.POSIXct(x, tz = "GMT", origin = "1970-01-01") + as.integer(x) +} +#' 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 +#' @author Bernhard Pfaff +#' @name intMinDay +#' @rdname intMinDay +#' @examples +#' d1 <- "2017-03-15" +#' d1 <- intMinDay(d1) +#' d2 <- "2017-03-15 00:00:00" +#' d2 <- intMinDay(d2) +#' identical(d1,d2) +#' @export +intMinDay <- function(x){ + d <- as.Date(x) + s <- as.POSIXct(paste0(d, "00:00:00"), + tz = "GMT", + origin = "1970-01-01") + date2int(s) +} +#' 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 +#' @author Bernhard Pfaff +#' @name intMaxDay +#' @rdname intMaxDay +#' @examples +#' d1 <- "2017-03-15" +#' d1 <- intMaxDay(d1) +#' d2 <- "2017-03-15 23:59:59" +#' d2 <- intMaxDay(d2) +#' identical(d1,d2) +#' @export +intMaxDay <- function(x){ + d <- as.Date(x) + e <- as.POSIXct(paste0(d, "23:59:59"), + tz = "GMT", + origin = "1970-01-01") + date2int(e) +} +#' 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} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name intRangeDay +#' @rdname intRangeDay +#' @examples +#' d1 <- "2017-03-15" +#' intRangeDay(d1) +#' intMinDay(d1) +#' intMaxDay(d1) +#' @export +intRangeDay <- function(x){ + d <- as.Date(x) + c(first = intMinDay(d), last = intMaxDay(d)) +} +#' 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. +#' +#' @return \code{integer} +#' @family UtilityFuncs +#' @author Bernhard Pfaff +#' @name intRangePeriod +#' @rdname intRangePeriod +#' @examples +#' d1 <- "2017-03-15" +#' d2 <- "2017-04-15" +#' intRangePeriod(d1, d2) +#' intMinDay(d1) +#' intMaxDay(d2) +#' @export +intRangePeriod <- function(d1, d2){ + d1 <- as.Date(d1) + d2 <- as.Date(d2) + if (d1 <= d2){ + ans <- c(first = intMinDay(d1), last = intMaxDay(d2)) + } else { + ans <- c(first = intMinDay(d2), last = intMaxDay(d1)) + } + ans +} diff --git a/man/ANSRPC-class.Rd b/man/ANSRPC-class.Rd index f13020e..d035186 100644 --- a/man/ANSRPC-class.Rd +++ b/man/ANSRPC-class.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/AllClasses.R -\docType{class} -\name{ANSRPC-class} -\alias{ANSRPC-class} -\title{The ANSRPC class} -\description{ -This class definition is employed to cast the JSON-objects -returned by API-calls to bitcoind. -} -\section{Slots}{ - -\describe{ -\item{\code{rpcname}}{\code{character} the name of the API.} - -\item{\code{result}}{\code{ANY} the output/result of the API.} - -\item{\code{ecode}}{\code{NullOrInteger} the error code, -in case of no error \code{NULL}.} - -\item{\code{emessage}}{\code{NullOrIntegerCharacter} the error message, -in case of no error \code{NULL}.} - -\item{\code{id}}{\code{character} identifier to API-call.} -}} - -\seealso{ -Other bitcoind functions: \code{\link{CONRPC-class}}, - \code{\link{NullOrCharacter-class}}, - \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, - \code{\link{rpcpost}}, \code{\link{startbtc}}, - \code{\link{stopbtc}} -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{ANSRPC-class} +\alias{ANSRPC-class} +\title{The ANSRPC class} +\description{ +This class definition is employed to cast the JSON-objects +returned by API-calls to bitcoind. +} +\section{Slots}{ + +\describe{ +\item{\code{rpcname}}{\code{character} the name of the API.} + +\item{\code{result}}{\code{ANY} the output/result of the API.} + +\item{\code{ecode}}{\code{NullOrInteger} the error code, +in case of no error \code{NULL}.} + +\item{\code{emessage}}{\code{NullOrIntegerCharacter} the error message, +in case of no error \code{NULL}.} + +\item{\code{id}}{\code{character} identifier to API-call.} +}} + +\seealso{ +Other bitcoind functions: \code{\link{CONRPC-class}}, + \code{\link{NullOrCharacter-class}}, + \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, + \code{\link{rpcpost}}, \code{\link{startbtc}}, + \code{\link{stopbtc}} +} diff --git a/man/BTCADR-class.Rd b/man/BTCADR-class.Rd new file mode 100644 index 0000000..c1f9366 --- /dev/null +++ b/man/BTCADR-class.Rd @@ -0,0 +1,43 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{BTCADR-class} +\alias{BTCADR-class} +\title{S4 class BTCADR} +\description{ +S4-class for BTC addresses, ordinarily created +by a call to \code{createBtcAdr()}. +} +\section{Slots}{ + +\describe{ +\item{\code{privkey}}{\code{character}, the private key.} + +\item{\code{wif}}{\code{character}, the WIF.} + +\item{\code{pubkey}}{\code{character}, the 512-bit public key.} + +\item{\code{pubhash}}{\code{character}, the hashed public key.} + +\item{\code{btcadr}}{\code{character}, the BTC address.} + +\item{\code{mainnet}}{\code{logical}, whether mainnet or testnet.} +}} + +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{PrivKey2PubKey}}, + \code{\link{PrivKey2Wif}}, \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/CONRPC-class.Rd b/man/CONRPC-class.Rd index e7d51d5..8a22464 100644 --- a/man/CONRPC-class.Rd +++ b/man/CONRPC-class.Rd @@ -1,25 +1,22 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/AllClasses.R -\docType{class} -\name{CONRPC-class} -\alias{CONRPC-class} -\title{The CONRPC class} -\description{ -S4-class for curl connections to RPC-JSON. -} -\details{ -The slots \code{rpcuse} and \code{rpcpwd} are required in the call -to \code{curl}. Furthermore, the fully qualified path to -\code{bitcoin.conf} (slot \code{config}) is required for starting -and stopping \code{bitcoind} as daemon. -} -\seealso{ -Other bitcoind functions: \code{\link{ANSRPC-class}}, - \code{\link{NullOrCharacter-class}}, - \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, - \code{\link{rpcpost}}, \code{\link{startbtc}}, - \code{\link{stopbtc}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{CONRPC-class} +\alias{CONRPC-class} +\title{The CONRPC class} +\description{ +S4-class for curl connections to RPC-JSON. +} +\details{ +The slots \code{rpcuse} and \code{rpcpwd} are required in the call +to \code{curl}. Furthermore, the fully qualified path to +\code{bitcoin.conf} (slot \code{config}) is required for starting +and stopping \code{bitcoind} as daemon. +} +\seealso{ +Other bitcoind functions: \code{\link{ANSRPC-class}}, + \code{\link{NullOrCharacter-class}}, + \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, + \code{\link{rpcpost}}, \code{\link{startbtc}}, + \code{\link{stopbtc}} +} diff --git a/man/ECPARAM-class.Rd b/man/ECPARAM-class.Rd new file mode 100644 index 0000000..9e40b3d --- /dev/null +++ b/man/ECPARAM-class.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{ECPARAM-class} +\alias{ECPARAM-class} +\title{The ECPARAM class} +\description{ +S4-class for elliptic curve parameters. +Objects of this class do contain the big integer parameters of +elliptic curves. Instances of this class are ordinarily created +by a call to \code{exparam} +} +\section{Slots}{ + +\describe{ +\item{\code{p}}{\code{bigz}, curve dimension.} + +\item{\code{a}}{\code{bigz}, parameter.} + +\item{\code{b}}{\code{bigz}, parameter.} +}} + +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPOINT-class}}, + \code{\link{EcparamOrNull-class}}, + \code{\link{containsPoint}}, \code{\link{ecoperators}}, + \code{\link{ecparam}}, \code{\link{ecpoint}}, + \code{\link{isNull}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/ECPOINT-class.Rd b/man/ECPOINT-class.Rd new file mode 100644 index 0000000..a112cc4 --- /dev/null +++ b/man/ECPOINT-class.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{ECPOINT-class} +\alias{ECPOINT-class} +\title{S4 Class ECPOINT} +\description{ +S4-class for a point on an elliptic curve. +Ordinarily, objects are created by calling +\code{ecpoint}. +} +\section{Slots}{ + +\describe{ +\item{\code{ecparam}}{\code{ECPARAM}} + +\item{\code{x}}{\code{bigz}} + +\item{\code{y}}{\code{bigz}} + +\item{\code{r}}{\code{bigz}} +}} + +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPARAM-class}}, + \code{\link{EcparamOrNull-class}}, + \code{\link{containsPoint}}, \code{\link{ecoperators}}, + \code{\link{ecparam}}, \code{\link{ecpoint}}, + \code{\link{isNull}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/EcparamOrNull-class.Rd b/man/EcparamOrNull-class.Rd new file mode 100644 index 0000000..dedb1c6 --- /dev/null +++ b/man/EcparamOrNull-class.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{EcparamOrNull-class} +\alias{EcparamOrNull-class} +\title{S4 Class Union ECPARAM or NULL} +\description{ +S4-class union of \code{NULL} or \code{ECPARAM}. +} +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPARAM-class}}, + \code{\link{ECPOINT-class}}, \code{\link{containsPoint}}, + \code{\link{ecoperators}}, \code{\link{ecparam}}, + \code{\link{ecpoint}}, \code{\link{isNull}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/NullOrCharacter-class.Rd b/man/NullOrCharacter-class.Rd index 319ad9e..3f5f0f6 100644 --- a/man/NullOrCharacter-class.Rd +++ b/man/NullOrCharacter-class.Rd @@ -1,16 +1,16 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/AllClasses.R -\docType{class} -\name{NullOrCharacter-class} -\alias{NullOrCharacter-class} -\title{S4 Class Union NULL or character} -\description{ -S4-class union of \code{NULL} or \code{character}. -} -\seealso{ -Other bitcoind functions: \code{\link{ANSRPC-class}}, - \code{\link{CONRPC-class}}, - \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, - \code{\link{rpcpost}}, \code{\link{startbtc}}, - \code{\link{stopbtc}} -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{NullOrCharacter-class} +\alias{NullOrCharacter-class} +\title{S4 Class Union NULL or character} +\description{ +S4-class union of \code{NULL} or \code{character}. +} +\seealso{ +Other bitcoind functions: \code{\link{ANSRPC-class}}, + \code{\link{CONRPC-class}}, + \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, + \code{\link{rpcpost}}, \code{\link{startbtc}}, + \code{\link{stopbtc}} +} diff --git a/man/NullOrInteger-class.Rd b/man/NullOrInteger-class.Rd index 06304f2..1a31497 100644 --- a/man/NullOrInteger-class.Rd +++ b/man/NullOrInteger-class.Rd @@ -1,16 +1,16 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/AllClasses.R -\docType{class} -\name{NullOrInteger-class} -\alias{NullOrInteger-class} -\title{S4 Class Union NULL or integer} -\description{ -S4-class union of \code{NULL} or \code{integer}. -} -\seealso{ -Other bitcoind functions: \code{\link{ANSRPC-class}}, - \code{\link{CONRPC-class}}, - \code{\link{NullOrCharacter-class}}, - \code{\link{conrpc}}, \code{\link{rpcpost}}, - \code{\link{startbtc}}, \code{\link{stopbtc}} -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{class} +\name{NullOrInteger-class} +\alias{NullOrInteger-class} +\title{S4 Class Union NULL or integer} +\description{ +S4-class union of \code{NULL} or \code{integer}. +} +\seealso{ +Other bitcoind functions: \code{\link{ANSRPC-class}}, + \code{\link{CONRPC-class}}, + \code{\link{NullOrCharacter-class}}, + \code{\link{conrpc}}, \code{\link{rpcpost}}, + \code{\link{startbtc}}, \code{\link{stopbtc}} +} diff --git a/man/PrivKey2PubKey.Rd b/man/PrivKey2PubKey.Rd new file mode 100644 index 0000000..642e183 --- /dev/null +++ b/man/PrivKey2PubKey.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{PrivKey2PubKey} +\alias{PrivKey2PubKey} +\title{Create public key from private key} +\usage{ +PrivKey2PubKey(privkey, mainnet = TRUE) +} +\arguments{ +\item{privkey}{\code{character}, the private key.} + +\item{mainnet}{\code{logical}, whether the WIF should correspond +to the mainnet or testnet.} +} +\value{ +\code{character}, the public key. +} +\description{ +This function creates the 512-bit public key corresponding +to a private key. +} +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2Wif}}, \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/PrivKey2Wif.Rd b/man/PrivKey2Wif.Rd new file mode 100644 index 0000000..08ae52f --- /dev/null +++ b/man/PrivKey2Wif.Rd @@ -0,0 +1,43 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{PrivKey2Wif} +\alias{PrivKey2Wif} +\title{Create WIF from a private key} +\usage{ +PrivKey2Wif(privkey, mainnet = TRUE) +} +\arguments{ +\item{privkey}{\code{character}, a private key.} + +\item{mainnet}{\code{logical}, whether the WIF should correspond +to the mainnet or testnet.} +} +\value{ +\code{character}, the WIF key +} +\description{ +Returns the corresponding WIF key from a private key +} +\examples{ +pk <- createPrivateKey() +PrivKey2Wif(pk) +} +\references{ +\url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/PubHash2BtcAdr.Rd b/man/PubHash2BtcAdr.Rd new file mode 100644 index 0000000..cb232a0 --- /dev/null +++ b/man/PubHash2BtcAdr.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{PubHash2BtcAdr} +\alias{PubHash2BtcAdr} +\title{Create BTC address from public key hash} +\usage{ +PubHash2BtcAdr(pubhash) +} +\arguments{ +\item{pubhash}{\code{character}, the public key hash.} +} +\value{ +\code{character}, the BTC address +} +\description{ +This function returns the corresponding BTC address from a +hashed public key. +} +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/PubKey2PubHash.Rd b/man/PubKey2PubHash.Rd new file mode 100644 index 0000000..fe15595 --- /dev/null +++ b/man/PubKey2PubHash.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{PubKey2PubHash} +\alias{PubKey2PubHash} +\title{Create public key hash from 512-bit public key} +\usage{ +PubKey2PubHash(pubkey, mainnet = TRUE) +} +\arguments{ +\item{pubkey}{\code{character}, the public key.} + +\item{mainnet}{\code{logical}, whether the WIF should correspond +to the mainnet or testnet.} +} +\value{ +\code{character}, the hash of a public key +} +\description{ +This function returns the associated public key hash +from a 512-bit public key by using the \code{hash160()} function. +} +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/Wif2PrivKey.Rd b/man/Wif2PrivKey.Rd new file mode 100644 index 0000000..9a97572 --- /dev/null +++ b/man/Wif2PrivKey.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{Wif2PrivKey} +\alias{Wif2PrivKey} +\title{Create private key from WIF} +\usage{ +Wif2PrivKey(wif) +} +\arguments{ +\item{wif}{\code{character}, a WIF key.} +} +\value{ +\code{character}, the corresponding private key. +} +\description{ +Returns the corresponding private key from a WIF key. +} +\examples{ +pk1 <- createPrivateKey() +wif <- PrivKey2Wif(pk1) +pk2 <- Wif2PrivKey(wif) +identical(pk1, pk2) +} +\references{ +\url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/addnode.Rd b/man/addnode.Rd index 86412ad..060493d 100644 --- a/man/addnode.Rd +++ b/man/addnode.Rd @@ -1,40 +1,40 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{addnode} -\alias{addnode} -\title{RPC-JSON API: addnode} -\usage{ -addnode(obj, node, command = c("add", "remove", "onetry")) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{node}{\code{character} the node (see \code{getpeerinfo()} for nodes).} - -\item{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.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Attempts to add or remove a node from the addnode list. -Or try a connection to a node once. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#addnode}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{clearbanned}}, - \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{listbanned}}, - \code{\link{ping}}, \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{addnode} +\alias{addnode} +\title{RPC-JSON API: addnode} +\usage{ +addnode(obj, node, command = c("add", "remove", "onetry")) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{node}{\code{character} the node (see \code{getpeerinfo()} for nodes).} + +\item{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.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Attempts to add or remove a node from the addnode list. +Or try a connection to a node once. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#addnode}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{clearbanned}}, + \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{listbanned}}, + \code{\link{ping}}, \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/base58CheckDecode.Rd b/man/base58CheckDecode.Rd new file mode 100644 index 0000000..032f0fc --- /dev/null +++ b/man/base58CheckDecode.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{base58CheckDecode} +\alias{base58CheckDecode} +\title{Base 58 binary-to-text-decoding} +\usage{ +base58CheckDecode(x) +} +\arguments{ +\item{x}{\code{character}, string in hex format.} +} +\value{ +\code{list}, the decoded elements of the string. +} +\description{ +This is a modified binary-to-text decoding used +for decoding Bitcoin addresses, aka \emph{Base58Check}. +If this is applied to a WIF address and the first and last four +bytes are dropped, the result is the corresponding private key. +} +\references{ +\url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +\url{https://en.bitcoin.it/wiki/Address},\cr +\url{https://en.bitcoin.it/wiki/Base58Check_encoding} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/base58CheckEncode.Rd b/man/base58CheckEncode.Rd new file mode 100644 index 0000000..610c882 --- /dev/null +++ b/man/base58CheckEncode.Rd @@ -0,0 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{base58CheckEncode} +\alias{base58CheckEncode} +\title{Base 58 binary-to-text-encoding} +\usage{ +base58CheckEncode(x) +} +\arguments{ +\item{x}{\code{character}, string in hex format.} +} +\value{ +\code{character}, the encoded string. +} +\description{ +This is a modified binary-to-text encoding used +for encoding Bitcoin addresses, aka \emph{Base58Check}. +If this is applied to an extended private key with its trailing +check sum, then the result is the \emph{Wallet Import Format}, +(WIF). +} +\references{ +\url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +\url{https://en.bitcoin.it/wiki/Address},\cr +\url{https://en.bitcoin.it/wiki/Base58Check_encoding} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/clearbanned.Rd b/man/clearbanned.Rd index 744d811..c50b843 100644 --- a/man/clearbanned.Rd +++ b/man/clearbanned.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{clearbanned} -\alias{clearbanned} -\title{RPC-JSON API: clearbanned} -\usage{ -clearbanned(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Clear all banned IPs. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#clearbanned}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{listbanned}}, - \code{\link{ping}}, \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{clearbanned} +\alias{clearbanned} +\title{RPC-JSON API: clearbanned} +\usage{ +clearbanned(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Clear all banned IPs. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#clearbanned}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{listbanned}}, + \code{\link{ping}}, \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/concatHex.Rd b/man/concatHex.Rd new file mode 100644 index 0000000..5f006c3 --- /dev/null +++ b/man/concatHex.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{concatHex} +\alias{concatHex} +\title{Concatenate two hex strings} +\usage{ +concatHex(hex1, hex2) +} +\arguments{ +\item{hex1}{\code{character}, a hex string.} + +\item{hex2}{\code{character}, a hex string.} +} +\value{ +\code{list} +} +\description{ +This function concatenates two hex strings, provided without the \code{0x} prefix, +and returns a \code{list} object of the associated +integers. +} +\examples{ +h1 <- "80" +h2 <- createPrivateKey() +concatHex(h1, h2) +} +\references{ +\url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/conrpc.Rd b/man/conrpc.Rd index 4283e0b..d81b460 100644 --- a/man/conrpc.Rd +++ b/man/conrpc.Rd @@ -1,29 +1,29 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bitcoind.R -\name{conrpc} -\alias{conrpc} -\title{Extracting Configuration Settings} -\usage{ -conrpc(conf.file) -} -\arguments{ -\item{conf.file}{\code{character}, the fully qualified path.} -} -\value{ -An S4-object of class \code{CONRPC}. -} -\description{ -This function extracts information from the configuration -file \code{bitcoin.conf} with respect to the options \code{rpcuser} -and \code{rpcpassword}. -} -\seealso{ -Other bitcoind functions: \code{\link{ANSRPC-class}}, - \code{\link{CONRPC-class}}, - \code{\link{NullOrCharacter-class}}, - \code{\link{NullOrInteger-class}}, \code{\link{rpcpost}}, - \code{\link{startbtc}}, \code{\link{stopbtc}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bitcoind.R +\name{conrpc} +\alias{conrpc} +\title{Extracting Configuration Settings} +\usage{ +conrpc(conf.file) +} +\arguments{ +\item{conf.file}{\code{character}, the fully qualified path.} +} +\value{ +An S4-object of class \code{CONRPC}. +} +\description{ +This function extracts information from the configuration +file \code{bitcoin.conf} with respect to the options \code{rpcuser} +and \code{rpcpassword}. +} +\seealso{ +Other bitcoind functions: \code{\link{ANSRPC-class}}, + \code{\link{CONRPC-class}}, + \code{\link{NullOrCharacter-class}}, + \code{\link{NullOrInteger-class}}, \code{\link{rpcpost}}, + \code{\link{startbtc}}, \code{\link{stopbtc}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/containsPoint-methods.Rd b/man/containsPoint-methods.Rd new file mode 100644 index 0000000..bce2085 --- /dev/null +++ b/man/containsPoint-methods.Rd @@ -0,0 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/EllipticCurves.R +\docType{methods} +\name{containsPoint} +\alias{containsPoint} +\alias{containsPoint,ECPARAM,bigz,bigz-method} +\alias{containsPoint,ECPARAM,integer,integer-method} +\alias{containsPoint,ECPARAM,character,character-method} +\title{containsPoint-methods} +\usage{ +containsPoint(curve, x, y) + +\S4method{containsPoint}{ECPARAM,bigz,bigz}(curve, x, y) + +\S4method{containsPoint}{ECPARAM,integer,integer}(curve, x, y) + +\S4method{containsPoint}{ECPARAM,character,character}(curve, x, y) +} +\arguments{ +\item{curve}{an S4-object of class \code{ECPARAM}.} + +\item{x}{an S4-object of class \code{bigz}, the x-coordinate.} + +\item{y}{an S4-object of class \code{bigz}, the y-coordinate.} +} +\value{ +\code{logical} +} +\description{ +Checks whether a point is on a defined ellipctic curve. +} +\examples{ +p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F" +b <- "0x0000000000000000000000000000000000000000000000000000000000000007" +a <- "0x0000000000000000000000000000000000000000000000000000000000000000" +curve256 <- ecparam(p, a, b) +Gx <- "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798" +Gy <- "0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8" +containsPoint(curve256, Gx, Gy) +} +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPARAM-class}}, + \code{\link{ECPOINT-class}}, + \code{\link{EcparamOrNull-class}}, + \code{\link{ecoperators}}, \code{\link{ecparam}}, + \code{\link{ecpoint}}, \code{\link{isNull}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/createBtcAdr.Rd b/man/createBtcAdr.Rd new file mode 100644 index 0000000..bb606ca --- /dev/null +++ b/man/createBtcAdr.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{createBtcAdr} +\alias{createBtcAdr} +\title{Create BTC addresses} +\usage{ +createBtcAdr(privkey, mainnet = TRUE) +} +\arguments{ +\item{privkey}{\code{character}, a private key.} + +\item{mainnet}{\code{logical}, for which net the keys should belong to.} +} +\value{ +Object of S4-class \code{BTCADR} +} +\description{ +This function creates an object of S4-class \code{BTCADR}. +} +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/createPrivateKey.Rd b/man/createPrivateKey.Rd new file mode 100644 index 0000000..fb35aa2 --- /dev/null +++ b/man/createPrivateKey.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{createPrivateKey} +\alias{createPrivateKey} +\title{Creation of a private key} +\usage{ +createPrivateKey() +} +\value{ +\code{character}. +} +\description{ +Returns a random 256-bit private key in hex notation. +} +\examples{ +createPrivateKey() +} +\references{ +\url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}}, + \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/date2int.Rd b/man/date2int.Rd new file mode 100644 index 0000000..f9199ce --- /dev/null +++ b/man/date2int.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{date2int} +\alias{date2int} +\title{Convert date/time to integer} +\usage{ +date2int(x) +} +\arguments{ +\item{x}{\code{POSIXct}, date/time object.} +} +\value{ +\code{integer} +} +\description{ +This function returns the associated \code{integer} time +for a given date/time object (coercible as \code{POSIXct} object. +} +\examples{ +d <- "2017-03-15" +date2int(d) +} +\seealso{ +Other UtilityFuncs: \code{\link{int2date}}, + \code{\link{intMaxDay}}, \code{\link{intMinDay}}, + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/decodeHex.Rd b/man/decodeHex.Rd new file mode 100644 index 0000000..995eee0 --- /dev/null +++ b/man/decodeHex.Rd @@ -0,0 +1,41 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{decodeHex} +\alias{decodeHex} +\title{Decoding of a hex string} +\usage{ +decodeHex(s) +} +\arguments{ +\item{s}{\code{character}, the hex string.} +} +\value{ +\code{list} +} +\description{ +This function converts a hex string,, whereby the string must not +contain the \code{0x} prefix, to a \code{list} object with the associated +integers as its elements. +} +\examples{ +pk <- createPrivateKey() +decodeHex(pk) +} +\references{ +\url{https://en.bitcoin.it/wiki/Wallet_import_format},\cr +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{hash160}}, + \code{\link{hash256}}, \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/decoderawtransaction.Rd b/man/decoderawtransaction.Rd index d1ad5f8..21a9f35 100644 --- a/man/decoderawtransaction.Rd +++ b/man/decoderawtransaction.Rd @@ -1,30 +1,30 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Rawtransactions.R -\name{decoderawtransaction} -\alias{decoderawtransaction} -\title{RPC-JSON API: decoderawtransaction} -\usage{ -decoderawtransaction(obj, hexstring) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{hexstring}{\code{character}, the transaction hex string.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Return a JSON object representing the serialized, -hex-encoded transaction. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getblock}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other RawTransactions RPCs: \code{\link{getrawtransaction}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/RawTransactions.R +\name{decoderawtransaction} +\alias{decoderawtransaction} +\title{RPC-JSON API: decoderawtransaction} +\usage{ +decoderawtransaction(obj, hexstring) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{hexstring}{\code{character}, the transaction hex string.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Return a JSON object representing the serialized, +hex-encoded transaction. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getblock}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other RawTransactions RPCs: \code{\link{getrawtransaction}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/disconnectnode.Rd b/man/disconnectnode.Rd index 2db6506..d859510 100644 --- a/man/disconnectnode.Rd +++ b/man/disconnectnode.Rd @@ -1,41 +1,41 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{disconnectnode} -\alias{disconnectnode} -\title{RPC-JSON API: disconnectnode} -\usage{ -disconnectnode(obj, address = NULL, nodeid = NULL) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{address}{\code{character} the IP address/port -of the node.} - -\item{nodeid}{\code{character} The node ID -(see \code{getpeerinfo()} for node IDs).} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Immediately disconnects from the specified peer node. -Strictly one out of \code{address} and \code{nodeid} can be -provided to identify the node. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#disconnectnode}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{listbanned}}, - \code{\link{ping}}, \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{disconnectnode} +\alias{disconnectnode} +\title{RPC-JSON API: disconnectnode} +\usage{ +disconnectnode(obj, address = NULL, nodeid = NULL) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{address}{\code{character} the IP address/port +of the node.} + +\item{nodeid}{\code{character} The node ID +(see \code{getpeerinfo()} for node IDs).} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Immediately disconnects from the specified peer node. +Strictly one out of \code{address} and \code{nodeid} can be +provided to identify the node. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#disconnectnode}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{listbanned}}, + \code{\link{ping}}, \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/ecoperators-methods.Rd b/man/ecoperators-methods.Rd new file mode 100644 index 0000000..c6f1429 --- /dev/null +++ b/man/ecoperators-methods.Rd @@ -0,0 +1,69 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/EllipticCurves.R +\docType{methods} +\name{ecoperators} +\alias{ecoperators} +\alias{doubleUp} +\alias{doubleUp,ECPOINT-method} +\alias{+,ECPOINT,ECPOINT-method} +\alias{leftmostBit} +\alias{leftmostBit,bigz-method} +\alias{AND} +\alias{AND,bigz,bigz-method} +\alias{*,ECPOINT,bigz-method} +\alias{*,bigz,ECPOINT-method} +\title{Elliptic curve operators} +\usage{ +doubleUp(ecp) + +\S4method{doubleUp}{ECPOINT}(ecp) + +\S4method{+}{ECPOINT,ECPOINT}(e1, e2) + +leftmostBit(x) + +\S4method{leftmostBit}{bigz}(x) + +AND(x, y) + +\S4method{AND}{bigz,bigz}(x, y) + +\S4method{*}{ECPOINT,bigz}(e1, e2) + +\S4method{*}{bigz,ECPOINT}(e1, e2) +} +\arguments{ +\item{ecp}{point on elliptic curve} + +\item{e1}{point on elliptic curve, or integer} + +\item{e2}{point on elliptic curve, or integer} + +\item{x}{integer} + +\item{y}{integer} +} +\description{ +The following operarations for EC points +are available: +\itemize{ +\item{doubleUp}{multiplying a point by itself} +\item{+}{point addition} +\item{leftmostBit}{highest bit value of an integer} +\item{AND}{logical and-operator for two integers} +\item{*}{multiplication of an integer scalar with an EC point} +} +} +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPARAM-class}}, + \code{\link{ECPOINT-class}}, + \code{\link{EcparamOrNull-class}}, + \code{\link{containsPoint}}, \code{\link{ecparam}}, + \code{\link{ecpoint}}, \code{\link{isNull}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/ecparam.Rd b/man/ecparam.Rd new file mode 100644 index 0000000..376d9ea --- /dev/null +++ b/man/ecparam.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/EllipticCurves.R +\name{ecparam} +\alias{ecparam} +\title{Creating objects of class ECPARAM} +\usage{ +ecparam(p, a, b) +} +\arguments{ +\item{p}{\code{integer}} + +\item{a}{\code{integer}} + +\item{b}{\code{integer}} +} +\value{ +An object of S4-class \code{ECPARAM} +} +\description{ +This function returns an object of S4-class \code{ECPARAM}, +that does contain the parametrization of an elliptic curve. +} +\examples{ +p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F" +b <- "0x0000000000000000000000000000000000000000000000000000000000000007" +a <- "0x0000000000000000000000000000000000000000000000000000000000000000" +curve256 <- ecparam(p, a, b) +curve256 +} +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPARAM-class}}, + \code{\link{ECPOINT-class}}, + \code{\link{EcparamOrNull-class}}, + \code{\link{containsPoint}}, \code{\link{ecoperators}}, + \code{\link{ecpoint}}, \code{\link{isNull}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/ecpoint.Rd b/man/ecpoint.Rd new file mode 100644 index 0000000..df29733 --- /dev/null +++ b/man/ecpoint.Rd @@ -0,0 +1,48 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/EllipticCurves.R +\name{ecpoint} +\alias{ecpoint} +\title{Creating objects of class ECPOINT} +\usage{ +ecpoint(ecparam = NULL, x, y, r = NULL) +} +\arguments{ +\item{ecparam}{\code{integerECPARAM}} + +\item{x}{x-coordinate, to be coercible to \code{bigz}.} + +\item{y}{y-coordinate, to be coercible to \code{bigz}.} + +\item{r}{the order of the base point.} +} +\value{ +An object of S4-class \code{ECPOINT} +} +\description{ +This function returns an object of S4-class \code{ECPOINT}, +that does represent a point on an elliptic curve. +} +\examples{ +p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F" +b <- "0x0000000000000000000000000000000000000000000000000000000000000007" +a <- "0x0000000000000000000000000000000000000000000000000000000000000000" +r <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141" +x <- "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798" +y <- "0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8" +curve256 <- ecparam(p, a, b) +ecp <- ecpoint(curve256, x, y, r) +ecp +} +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPARAM-class}}, + \code{\link{ECPOINT-class}}, + \code{\link{EcparamOrNull-class}}, + \code{\link{containsPoint}}, \code{\link{ecoperators}}, + \code{\link{ecparam}}, \code{\link{isNull}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getaddednodeinfo.Rd b/man/getaddednodeinfo.Rd index c46b93d..0ef315f 100644 --- a/man/getaddednodeinfo.Rd +++ b/man/getaddednodeinfo.Rd @@ -1,37 +1,37 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{getaddednodeinfo} -\alias{getaddednodeinfo} -\title{RPC-JSON API: getaddednodeinfo} -\usage{ -getaddednodeinfo(obj, node = NULL) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{node}{\code{character} the node (see \code{getpeerinfo()} -for nodes).} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns information about the given added node, -or all added nodes (note that onetry addnodes -are not listed here) -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getaddednodeinfo}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{listbanned}}, - \code{\link{ping}}, \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{getaddednodeinfo} +\alias{getaddednodeinfo} +\title{RPC-JSON API: getaddednodeinfo} +\usage{ +getaddednodeinfo(obj, node = NULL) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{node}{\code{character} the node (see \code{getpeerinfo()} +for nodes).} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns information about the given added node, +or all added nodes (note that onetry addnodes +are not listed here) +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getaddednodeinfo}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{listbanned}}, + \code{\link{ping}}, \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getbestblockhash.Rd b/man/getbestblockhash.Rd index 8691c56..581415c 100644 --- a/man/getbestblockhash.Rd +++ b/man/getbestblockhash.Rd @@ -1,41 +1,41 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getbestblockhash} -\alias{getbestblockhash} -\title{RPC-JSON API: getbestblockhash} -\usage{ -getbestblockhash(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns the hash of the best (tip) block in the longest blockchain. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getbestblockhash}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Blockchain RPCs: \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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getbestblockhash} +\alias{getbestblockhash} +\title{RPC-JSON API: getbestblockhash} +\usage{ +getbestblockhash(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns the hash of the best (tip) block in the longest blockchain. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getbestblockhash}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Blockchain RPCs: \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 +} diff --git a/man/getblock.Rd b/man/getblock.Rd index 5da3563..8577bda 100644 --- a/man/getblock.Rd +++ b/man/getblock.Rd @@ -1,55 +1,55 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getblock} -\alias{getblock} -\title{RPC-JSON API: getblock} -\usage{ -getblock(obj, blockhash, verbosity = c("l1", "l0", "l2")) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{blockhash}{\code{character}, the block hash.} - -\item{verbosity}{\code{character}, level of returned details.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns information of a block hash. The returned level of details depends on the -argument \code{verbosity}. -} -\section{}{ - Details -If verbosity is 'l0', returns a string that is serialized, -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. -} - -\references{ -\url{https://bitcoin.org/en/developer-reference#getblock}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getblock} +\alias{getblock} +\title{RPC-JSON API: getblock} +\usage{ +getblock(obj, blockhash, verbosity = c("l1", "l0", "l2")) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{blockhash}{\code{character}, the block hash.} + +\item{verbosity}{\code{character}, level of returned details.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns information of a block hash. The returned level of details depends on the +argument \code{verbosity}. +} +\section{}{ + Details +If verbosity is 'l0', returns a string that is serialized, +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. +} + +\references{ +\url{https://bitcoin.org/en/developer-reference#getblock}, +\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{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 +} diff --git a/man/getblockchaininfo.Rd b/man/getblockchaininfo.Rd index 6a9980e..60cd61a 100644 --- a/man/getblockchaininfo.Rd +++ b/man/getblockchaininfo.Rd @@ -1,41 +1,41 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getblockchaininfo} -\alias{getblockchaininfo} -\title{RPC-JSON API: getblockchaininfo} -\usage{ -getblockchaininfo(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns an object containing various state info regarding blockchain processing. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getblockchaininfo}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, - \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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getblockchaininfo} +\alias{getblockchaininfo} +\title{RPC-JSON API: getblockchaininfo} +\usage{ +getblockchaininfo(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns an object containing various state info regarding blockchain processing. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getblockchaininfo}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Blockchain RPCs: \code{\link{getbestblockhash}}, + \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 +} diff --git a/man/getblockcount.Rd b/man/getblockcount.Rd index 61af6b6..80fdc87 100644 --- a/man/getblockcount.Rd +++ b/man/getblockcount.Rd @@ -1,41 +1,41 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getblockcount} -\alias{getblockcount} -\title{RPC-JSON API: getblockcount} -\usage{ -getblockcount(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns the number of blocks in the longest blockchain. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getblockcount}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Blockchain RPCs: \code{\link{getbestblockhash}}, - \code{\link{getblockchaininfo}}, - \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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getblockcount} +\alias{getblockcount} +\title{RPC-JSON API: getblockcount} +\usage{ +getblockcount(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns the number of blocks in the longest blockchain. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getblockcount}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Blockchain RPCs: \code{\link{getbestblockhash}}, + \code{\link{getblockchaininfo}}, + \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 +} diff --git a/man/getblockhash.Rd b/man/getblockhash.Rd index 20da633..fdd4656 100644 --- a/man/getblockhash.Rd +++ b/man/getblockhash.Rd @@ -1,44 +1,44 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getblockhash} -\alias{getblockhash} -\title{RPC-JSON API: getblockhash} -\usage{ -getblockhash(obj, height) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{height}{\code{integer} the height index.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns hash of block in best-block-chain at height provided. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getblockhash}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getblockhash} +\alias{getblockhash} +\title{RPC-JSON API: getblockhash} +\usage{ +getblockhash(obj, height) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{height}{\code{integer} the height index.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns hash of block in best-block-chain at height provided. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getblockhash}, +\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{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 +} diff --git a/man/getblockheader.Rd b/man/getblockheader.Rd index b8208e5..d91b148 100644 --- a/man/getblockheader.Rd +++ b/man/getblockheader.Rd @@ -1,53 +1,53 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getblockheader} -\alias{getblockheader} -\title{RPC-JSON API: getblockheader} -\usage{ -getblockheader(obj, hash, verbose = TRUE) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{hash}{\code{character} the block hash.} - -\item{verbose}{\code{logical} \code{TRUE} for a json object, -\code{FALSE} for the hex encoded data.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns the block header for a given hash string. -} -\section{Details}{ - -If verbose is false, returns a string that is serialized, -hex-encoded data for blockheader 'hash'. If verbose is true, -returns an Object with information about blockheader . -} - -\references{ -\url{https://bitcoin.org/en/developer-reference#getblockheader}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getblockheader} +\alias{getblockheader} +\title{RPC-JSON API: getblockheader} +\usage{ +getblockheader(obj, hash, verbose = TRUE) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{hash}{\code{character} the block hash.} + +\item{verbose}{\code{logical} \code{TRUE} for a json object, +\code{FALSE} for the hex encoded data.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns the block header for a given hash string. +} +\section{Details}{ + +If verbose is false, returns a string that is serialized, +hex-encoded data for blockheader 'hash'. If verbose is true, +returns an Object with information about blockheader . +} + +\references{ +\url{https://bitcoin.org/en/developer-reference#getblockheader}, +\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{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 +} diff --git a/man/getchaintips.Rd b/man/getchaintips.Rd index 40ab55f..eb9b9b0 100644 --- a/man/getchaintips.Rd +++ b/man/getchaintips.Rd @@ -1,42 +1,42 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getchaintips} -\alias{getchaintips} -\title{RPC-JSON API: getchaintips} -\usage{ -getchaintips(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Return information about all known tips in the block tree, -including the main chain as well as orphaned branches. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getchaintips}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getchaintips} +\alias{getchaintips} +\title{RPC-JSON API: getchaintips} +\usage{ +getchaintips(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Return information about all known tips in the block tree, +including the main chain as well as orphaned branches. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getchaintips}, +\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{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 +} diff --git a/man/getchaintxstats.Rd b/man/getchaintxstats.Rd index dccb3db..378f062 100644 --- a/man/getchaintxstats.Rd +++ b/man/getchaintxstats.Rd @@ -1,47 +1,47 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getchaintxstats} -\alias{getchaintxstats} -\title{RPC-JSON API: getchaintxstats} -\usage{ -getchaintxstats(obj, nblocks = NULL, blockhash = NULL) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{nblocks}{\code{integer} optional, size of the window in -number of blocks (default: one month).} - -\item{blockhash}{\code{character} optional, the hash of the block -that ends the window.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Compute statistics about the total number and -rate of transactions in the chain. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getchaintxstats}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getchaintxstats} +\alias{getchaintxstats} +\title{RPC-JSON API: getchaintxstats} +\usage{ +getchaintxstats(obj, nblocks = NULL, blockhash = NULL) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{nblocks}{\code{integer} optional, size of the window in +number of blocks (default: one month).} + +\item{blockhash}{\code{character} optional, the hash of the block +that ends the window.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Compute statistics about the total number and +rate of transactions in the chain. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getchaintxstats}, +\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{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 +} diff --git a/man/getconnectioncount.Rd b/man/getconnectioncount.Rd index b6f8e6a..b0ca21d 100644 --- a/man/getconnectioncount.Rd +++ b/man/getconnectioncount.Rd @@ -1,32 +1,32 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{getconnectioncount} -\alias{getconnectioncount} -\title{RPC-JSON API: getconnectioncount} -\usage{ -getconnectioncount(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns the number of connections to other nodes. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getconnectioncount}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{listbanned}}, - \code{\link{ping}}, \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{getconnectioncount} +\alias{getconnectioncount} +\title{RPC-JSON API: getconnectioncount} +\usage{ +getconnectioncount(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns the number of connections to other nodes. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getconnectioncount}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{listbanned}}, + \code{\link{ping}}, \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getdifficulty.Rd b/man/getdifficulty.Rd index cca28ba..368ed21 100644 --- a/man/getdifficulty.Rd +++ b/man/getdifficulty.Rd @@ -1,41 +1,41 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getdifficulty} -\alias{getdifficulty} -\title{RPC-JSON API: getdifficulty} -\usage{ -getdifficulty(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns the proof-of-work difficulty as a multiple of the minimum difficulty. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getdifficulty}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getdifficulty} +\alias{getdifficulty} +\title{RPC-JSON API: getdifficulty} +\usage{ +getdifficulty(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns the proof-of-work difficulty as a multiple of the minimum difficulty. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getdifficulty}, +\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{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 +} diff --git a/man/gethelp.Rd b/man/gethelp.Rd index 63c791a..c7dcfd3 100644 --- a/man/gethelp.Rd +++ b/man/gethelp.Rd @@ -1,30 +1,30 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ControlRpcs.R -\name{gethelp} -\alias{gethelp} -\title{RPC-JSON API: Help} -\usage{ -gethelp(obj, rpc = "") -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{rpc}{\code{character}, name of RPC function.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returning information about RPC functions. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#help}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Control RPCs: \code{\link{getinfo}}, - \code{\link{getwalletinfo}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ControlRpcs.R +\name{gethelp} +\alias{gethelp} +\title{RPC-JSON API: Help} +\usage{ +gethelp(obj, rpc = "") +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{rpc}{\code{character}, name of RPC function.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returning information about RPC functions. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#help}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Control RPCs: \code{\link{getinfo}}, + \code{\link{getwalletinfo}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getinfo.Rd b/man/getinfo.Rd index 1c1e0fa..aa6deb4 100644 --- a/man/getinfo.Rd +++ b/man/getinfo.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ControlRpcs.R -\name{getinfo} -\alias{getinfo} -\title{RPC-JSON API: getinfo} -\usage{ -getinfo(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returning information about bitcoin configuration and settings. -} -\details{ -WARNING: getinfo is deprecated and will be fully removed in 0.16. -Projects should transition to using getblockchaininfo, getnetworkinfo, and -getwalletinfo before upgrading to 0.16. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getinfo}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Control RPCs: \code{\link{gethelp}}, - \code{\link{getwalletinfo}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ControlRpcs.R +\name{getinfo} +\alias{getinfo} +\title{RPC-JSON API: getinfo} +\usage{ +getinfo(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returning information about bitcoin configuration and settings. +} +\details{ +WARNING: getinfo is deprecated and will be fully removed in 0.16. +Projects should transition to using getblockchaininfo, getnetworkinfo, and +getwalletinfo before upgrading to 0.16. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getinfo}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Control RPCs: \code{\link{gethelp}}, + \code{\link{getwalletinfo}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getmempoolancestors.Rd b/man/getmempoolancestors.Rd index f8f52ba..cdffc04 100644 --- a/man/getmempoolancestors.Rd +++ b/man/getmempoolancestors.Rd @@ -1,46 +1,46 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getmempoolancestors} -\alias{getmempoolancestors} -\title{RPC-JSON API: getmempoolancestors} -\usage{ -getmempoolancestors(obj, txid, verbose = FALSE) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{txid}{\code{character}, the transaction id (must be in mempool).} - -\item{verbose}{\code{logical}, \code{TrueTRUE} for a json object, -\code{FALSE} for array of transaction ids (default).} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -If txid is in the mempool, returns all in-mempool ancestors. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getmempoolancestors}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getmempoolancestors} +\alias{getmempoolancestors} +\title{RPC-JSON API: getmempoolancestors} +\usage{ +getmempoolancestors(obj, txid, verbose = FALSE) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{txid}{\code{character}, the transaction id (must be in mempool).} + +\item{verbose}{\code{logical}, \code{TrueTRUE} for a json object, +\code{FALSE} for array of transaction ids (default).} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +If txid is in the mempool, returns all in-mempool ancestors. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getmempoolancestors}, +\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{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 +} diff --git a/man/getmempooldescendants.Rd b/man/getmempooldescendants.Rd index af19625..1142ff8 100644 --- a/man/getmempooldescendants.Rd +++ b/man/getmempooldescendants.Rd @@ -1,46 +1,46 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getmempooldescendants} -\alias{getmempooldescendants} -\title{RPC-JSON API: getmempooldescendants} -\usage{ -getmempooldescendants(obj, txid, verbose = FALSE) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{txid}{\code{character}, the transaction id (must be in mempool).} - -\item{verbose}{\code{logical}, \code{TrueTRUE} for a json object, -\code{FALSE} for array of transaction ids (default).} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -If txid is in the mempool, returns all in-mempool descendants. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getmempooldescendants}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getmempooldescendants} +\alias{getmempooldescendants} +\title{RPC-JSON API: getmempooldescendants} +\usage{ +getmempooldescendants(obj, txid, verbose = FALSE) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{txid}{\code{character}, the transaction id (must be in mempool).} + +\item{verbose}{\code{logical}, \code{TrueTRUE} for a json object, +\code{FALSE} for array of transaction ids (default).} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +If txid is in the mempool, returns all in-mempool descendants. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getmempooldescendants}, +\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{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 +} diff --git a/man/getmempoolentry.Rd b/man/getmempoolentry.Rd index e406fcc..77d8bf7 100644 --- a/man/getmempoolentry.Rd +++ b/man/getmempoolentry.Rd @@ -1,43 +1,43 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getmempoolentry} -\alias{getmempoolentry} -\title{RPC-JSON API: getmempoolentry} -\usage{ -getmempoolentry(obj, txid) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{txid}{\code{character}, the transaction id (must be in mempool).} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns mempool data for given transaction. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getmempoolentry}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getmempoolentry} +\alias{getmempoolentry} +\title{RPC-JSON API: getmempoolentry} +\usage{ +getmempoolentry(obj, txid) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{txid}{\code{character}, the transaction id (must be in mempool).} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns mempool data for given transaction. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getmempoolentry}, +\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{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 +} diff --git a/man/getmempoolinfo.Rd b/man/getmempoolinfo.Rd index e833544..902f02d 100644 --- a/man/getmempoolinfo.Rd +++ b/man/getmempoolinfo.Rd @@ -1,41 +1,41 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getmempoolinfo} -\alias{getmempoolinfo} -\title{RPC-JSON API: getmempoolinfo} -\usage{ -getmempoolinfo(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns details on the active state of the TX memory pool. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getmempoolinfo}, -\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{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 -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getmempoolinfo} +\alias{getmempoolinfo} +\title{RPC-JSON API: getmempoolinfo} +\usage{ +getmempoolinfo(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns details on the active state of the TX memory pool. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getmempoolinfo}, +\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{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 +} diff --git a/man/getnettotals.Rd b/man/getnettotals.Rd index 1feabcf..5245ac5 100644 --- a/man/getnettotals.Rd +++ b/man/getnettotals.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{getnettotals} -\alias{getnettotals} -\title{RPC-JSON API: getnettotals} -\usage{ -getnettotals(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns information about network traffic, including bytes in, -bytes out, and current time. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getnettotals}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnetworkinfo}}, \code{\link{getpeerinfo}}, - \code{\link{listbanned}}, \code{\link{ping}}, - \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{getnettotals} +\alias{getnettotals} +\title{RPC-JSON API: getnettotals} +\usage{ +getnettotals(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns information about network traffic, including bytes in, +bytes out, and current time. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getnettotals}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnetworkinfo}}, \code{\link{getpeerinfo}}, + \code{\link{listbanned}}, \code{\link{ping}}, + \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getnetworkinfo.Rd b/man/getnetworkinfo.Rd index 60e32a0..b480d7f 100644 --- a/man/getnetworkinfo.Rd +++ b/man/getnetworkinfo.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{getnetworkinfo} -\alias{getnetworkinfo} -\title{RPC-JSON API: getnetworkinfo} -\usage{ -getnetworkinfo(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns an object containing various state info regarding P2P networking. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getnetworkinfo}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getpeerinfo}}, - \code{\link{listbanned}}, \code{\link{ping}}, - \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{getnetworkinfo} +\alias{getnetworkinfo} +\title{RPC-JSON API: getnetworkinfo} +\usage{ +getnetworkinfo(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns an object containing various state info regarding P2P networking. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getnetworkinfo}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getpeerinfo}}, + \code{\link{listbanned}}, \code{\link{ping}}, + \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getpeerinfo.Rd b/man/getpeerinfo.Rd index e26e130..e7b9164 100644 --- a/man/getpeerinfo.Rd +++ b/man/getpeerinfo.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{getpeerinfo} -\alias{getpeerinfo} -\title{RPC-JSON API: getpeerinfo} -\usage{ -getpeerinfo(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns data about each connected network node as a json array of objects. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getpeerinfo}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{listbanned}}, \code{\link{ping}}, - \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{getpeerinfo} +\alias{getpeerinfo} +\title{RPC-JSON API: getpeerinfo} +\usage{ +getpeerinfo(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns data about each connected network node as a json array of objects. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getpeerinfo}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{listbanned}}, \code{\link{ping}}, + \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getrawmempool.Rd b/man/getrawmempool.Rd index 8cfa5fd..381d0b3 100644 --- a/man/getrawmempool.Rd +++ b/man/getrawmempool.Rd @@ -1,48 +1,48 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{getrawmempool} -\alias{getrawmempool} -\title{RPC-JSON API: getrawmempool} -\usage{ -getrawmempool(obj, verbose = TRUE) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{verbose}{\code{logical}, \code{TRUE} for a json object, -\code{FALSE} for array of transaction ids} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns all transaction ids in memory pool as a json array -of string transaction ids. -Hint: use getmempoolentry to fetch a specific transaction -from the mempool. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getrawmempool}, -\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{gettxoutproof}}, - \code{\link{gettxoutsetinfo}}, \code{\link{gettxout}}, - \code{\link{preciousblock}}, - \code{\link{pruneblockchain}}, \code{\link{verifychain}}, - \code{\link{verifytxoutproof}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{getrawmempool} +\alias{getrawmempool} +\title{RPC-JSON API: getrawmempool} +\usage{ +getrawmempool(obj, verbose = TRUE) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{verbose}{\code{logical}, \code{TRUE} for a json object, +\code{FALSE} for array of transaction ids} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns all transaction ids in memory pool as a json array +of string transaction ids. +Hint: use getmempoolentry to fetch a specific transaction +from the mempool. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getrawmempool}, +\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{gettxoutproof}}, + \code{\link{gettxoutsetinfo}}, \code{\link{gettxout}}, + \code{\link{preciousblock}}, + \code{\link{pruneblockchain}}, \code{\link{verifychain}}, + \code{\link{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getrawtransaction.Rd b/man/getrawtransaction.Rd index 02d9b20..65d5f04 100644 --- a/man/getrawtransaction.Rd +++ b/man/getrawtransaction.Rd @@ -1,41 +1,41 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Rawtransactions.R -\name{getrawtransaction} -\alias{getrawtransaction} -\title{RPC-JSON API: getrawtransaction} -\usage{ -getrawtransaction(obj, txid, verbose = FALSE) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{txid}{\code{character}, the transaction id.} - -\item{verbose}{\code{logical}, type of output.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns the raw transaction data. -} -\section{}{ - Details -By default this function only works for mempool transactions. -If the -txindex option is enabled, it also works for blockchain transactions. -DEPRECATED: for now, it also works for transactions with unspent outputs. -If verbose is 'true', returns an object with information about 'txid'. -If verbose is 'false' or omitted, returns a string that is serialized, -hex-encoded data for 'txid'. -} - -\references{ -\url{https://bitcoin.org/en/developer-reference#getblock}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other RawTransactions RPCs: \code{\link{decoderawtransaction}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/RawTransactions.R +\name{getrawtransaction} +\alias{getrawtransaction} +\title{RPC-JSON API: getrawtransaction} +\usage{ +getrawtransaction(obj, txid, verbose = FALSE) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{txid}{\code{character}, the transaction id.} + +\item{verbose}{\code{logical}, type of output.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns the raw transaction data. +} +\section{}{ + Details +By default this function only works for mempool transactions. +If the -txindex option is enabled, it also works for blockchain transactions. +DEPRECATED: for now, it also works for transactions with unspent outputs. +If verbose is 'true', returns an object with information about 'txid'. +If verbose is 'false' or omitted, returns a string that is serialized, +hex-encoded data for 'txid'. +} + +\references{ +\url{https://bitcoin.org/en/developer-reference#getblock}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other RawTransactions RPCs: \code{\link{decoderawtransaction}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/gettxout.Rd b/man/gettxout.Rd index 083f8f5..89dae8b 100644 --- a/man/gettxout.Rd +++ b/man/gettxout.Rd @@ -1,51 +1,51 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{gettxout} -\alias{gettxout} -\title{RPC-JSON API: gettxout} -\usage{ -gettxout(obj, txid, n, incmempool = TRUE) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{txid}{\code{charcater} the transaction id.} - -\item{n}{\code{integer} vout number.} - -\item{incmempool}{\code{logical} whether to include the mempool (default \code{TRUE}).} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns details about an unspent transaction output. -} -\details{ -Note that an unspent output that is spent in the mempool won't appear. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#gettxout}, -\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{preciousblock}}, - \code{\link{pruneblockchain}}, \code{\link{verifychain}}, - \code{\link{verifytxoutproof}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{gettxout} +\alias{gettxout} +\title{RPC-JSON API: gettxout} +\usage{ +gettxout(obj, txid, n, incmempool = TRUE) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{txid}{\code{charcater} the transaction id.} + +\item{n}{\code{integer} vout number.} + +\item{incmempool}{\code{logical} whether to include the mempool (default \code{TRUE}).} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns details about an unspent transaction output. +} +\details{ +Note that an unspent output that is spent in the mempool won't appear. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#gettxout}, +\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{preciousblock}}, + \code{\link{pruneblockchain}}, \code{\link{verifychain}}, + \code{\link{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/gettxoutproof.Rd b/man/gettxoutproof.Rd index a73ab9e..3ca0741 100644 --- a/man/gettxoutproof.Rd +++ b/man/gettxoutproof.Rd @@ -1,54 +1,54 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{gettxoutproof} -\alias{gettxoutproof} -\title{RPC-JSON API: gettxoutproof} -\usage{ -gettxoutproof(obj, txids, blockhash = NULL) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{txids}{\code{charcater} a json array of txids to filter.} - -\item{blockhash}{\code{integer} looks for txid in the block with this hash, -(optional, default \code{NULL}).} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns a hex-encoded proof that "txid" was included in a block. -} -\details{ -NOTE: By default this function only works sometimes. This is when there is an -unspent output in the utxo for this transaction. To make it always work, -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). -} -\references{ -\url{https://bitcoin.org/en/developer-reference#gettxoutproof}, -\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{gettxoutsetinfo}}, \code{\link{gettxout}}, - \code{\link{preciousblock}}, - \code{\link{pruneblockchain}}, \code{\link{verifychain}}, - \code{\link{verifytxoutproof}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{gettxoutproof} +\alias{gettxoutproof} +\title{RPC-JSON API: gettxoutproof} +\usage{ +gettxoutproof(obj, txids, blockhash = NULL) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{txids}{\code{charcater} a json array of txids to filter.} + +\item{blockhash}{\code{integer} looks for txid in the block with this hash, +(optional, default \code{NULL}).} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns a hex-encoded proof that "txid" was included in a block. +} +\details{ +NOTE: By default this function only works sometimes. This is when there is an +unspent output in the utxo for this transaction. To make it always work, +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). +} +\references{ +\url{https://bitcoin.org/en/developer-reference#gettxoutproof}, +\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{gettxoutsetinfo}}, \code{\link{gettxout}}, + \code{\link{preciousblock}}, + \code{\link{pruneblockchain}}, \code{\link{verifychain}}, + \code{\link{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/gettxoutsetinfo.Rd b/man/gettxoutsetinfo.Rd index 12ca1e1..5185d2c 100644 --- a/man/gettxoutsetinfo.Rd +++ b/man/gettxoutsetinfo.Rd @@ -1,42 +1,42 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{gettxoutsetinfo} -\alias{gettxoutsetinfo} -\title{RPC-JSON API: gettxoutsetinfo} -\usage{ -gettxoutsetinfo(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returns statistics about the unspent transaction output set. -Note this call may take some time. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#gettxoutsetinfo}, -\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{gettxout}}, \code{\link{preciousblock}}, - \code{\link{pruneblockchain}}, \code{\link{verifychain}}, - \code{\link{verifytxoutproof}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{gettxoutsetinfo} +\alias{gettxoutsetinfo} +\title{RPC-JSON API: gettxoutsetinfo} +\usage{ +gettxoutsetinfo(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returns statistics about the unspent transaction output set. +Note this call may take some time. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#gettxoutsetinfo}, +\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{gettxout}}, \code{\link{preciousblock}}, + \code{\link{pruneblockchain}}, \code{\link{verifychain}}, + \code{\link{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/getwalletinfo.Rd b/man/getwalletinfo.Rd index 50b65f8..67595ee 100644 --- a/man/getwalletinfo.Rd +++ b/man/getwalletinfo.Rd @@ -1,28 +1,28 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ControlRpcs.R -\name{getwalletinfo} -\alias{getwalletinfo} -\title{RPC-JSON API: getwalletinfo} -\usage{ -getwalletinfo(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Returning information about bitcoin wallet. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#getwalletinfo}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Control RPCs: \code{\link{gethelp}}, - \code{\link{getinfo}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ControlRpcs.R +\name{getwalletinfo} +\alias{getwalletinfo} +\title{RPC-JSON API: getwalletinfo} +\usage{ +getwalletinfo(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Returning information about bitcoin wallet. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#getwalletinfo}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Control RPCs: \code{\link{gethelp}}, + \code{\link{getinfo}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/hash160.Rd b/man/hash160.Rd new file mode 100644 index 0000000..a64f658 --- /dev/null +++ b/man/hash160.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{hash160} +\alias{hash160} +\title{BTC hash160} +\usage{ +hash160(d) +} +\arguments{ +\item{d}{\code{raw}, vector.} +} +\value{ +\code{character}, the value of \code{d} hashed with +\code{sha256} and \code{ripemd160}. +} +\description{ +This function returns the hash by applying the \code{sha256} hashing +first and then to the resulting hash the \code{ripemd160} algorithm. +} +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash256}}, \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/hash256.Rd b/man/hash256.Rd new file mode 100644 index 0000000..0dcf959 --- /dev/null +++ b/man/hash256.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BtcAddresses.R +\name{hash256} +\alias{hash256} +\title{BTC hash256} +\usage{ +hash256(d) +} +\arguments{ +\item{d}{\code{raw}, vector.} +} +\value{ +\code{character}, the value of \code{d} hashed twice. +} +\description{ +This function returns the hash by applying the \code{sha256} hashing +algorithm twice to a \code{raw} object. +} +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{validBtcAdr}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/int2date.Rd b/man/int2date.Rd new file mode 100644 index 0000000..fd61c91 --- /dev/null +++ b/man/int2date.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{int2date} +\alias{int2date} +\title{Convert time stamp to POSIX} +\usage{ +int2date(x) +} +\arguments{ +\item{x}{\code{integer}, the block header time stamp} +} +\value{ +An object of class \code{POSIXct, POSIXt} +} +\description{ +This function returns the associated \code{POSIXct} time +to the time stamp integer in a block header. +} +\examples{ +ts <- 1532954868 +int2date(ts) +} +\references{ +\url{https://en.bitcoin.it/wiki/Block_timestamp} +} +\seealso{ +Other UtilityFuncs: \code{\link{date2int}}, + \code{\link{intMaxDay}}, \code{\link{intMinDay}}, + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/intMaxDay.Rd b/man/intMaxDay.Rd new file mode 100644 index 0000000..7e32f9b --- /dev/null +++ b/man/intMaxDay.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{intMaxDay} +\alias{intMaxDay} +\title{Integer representation of a day-end} +\usage{ +intMaxDay(x) +} +\arguments{ +\item{x}{\code{POSIXct}, date/time object.} +} +\value{ +\code{integer} +} +\description{ +This function returns the associated \code{integer} time +for the end of a specific day (\emph{i.e.}, \code{23:59:59} time). +} +\examples{ +d1 <- "2017-03-15" +d1 <- intMaxDay(d1) +d2 <- "2017-03-15 23:59:59" +d2 <- intMaxDay(d2) +identical(d1,d2) +} +\seealso{ +Other UtilityFuncs: \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMinDay}}, + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/intMinDay.Rd b/man/intMinDay.Rd new file mode 100644 index 0000000..181af38 --- /dev/null +++ b/man/intMinDay.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{intMinDay} +\alias{intMinDay} +\title{Integer representation of a day-begin} +\usage{ +intMinDay(x) +} +\arguments{ +\item{x}{\code{POSIXct}, date/time object.} +} +\value{ +\code{integer} +} +\description{ +This function returns the associated \code{integer} time +for the start of a specific day (\emph{i.e.}, \code{00:00:00} time). +} +\examples{ +d1 <- "2017-03-15" +d1 <- intMinDay(d1) +d2 <- "2017-03-15 00:00:00" +d2 <- intMinDay(d2) +identical(d1,d2) +} +\seealso{ +Other UtilityFuncs: \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intRangeDay}}, \code{\link{intRangePeriod}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/intRangeDay.Rd b/man/intRangeDay.Rd new file mode 100644 index 0000000..68eb7fa --- /dev/null +++ b/man/intRangeDay.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{intRangeDay} +\alias{intRangeDay} +\title{Integer range within a day} +\usage{ +intRangeDay(x) +} +\arguments{ +\item{x}{\code{POSIXct}, date/time object.} +} +\value{ +\code{integer} +} +\description{ +This function returns the associated \code{integer} times +for the start and end of a specific day. +} +\examples{ +d1 <- "2017-03-15" +intRangeDay(d1) +intMinDay(d1) +intMaxDay(d1) +} +\seealso{ +Other UtilityFuncs: \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangePeriod}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/intRangePeriod.Rd b/man/intRangePeriod.Rd new file mode 100644 index 0000000..ecb2bb3 --- /dev/null +++ b/man/intRangePeriod.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/UtilFuncs.R +\name{intRangePeriod} +\alias{intRangePeriod} +\title{Integer range between two dates} +\usage{ +intRangePeriod(d1, d2) +} +\arguments{ +\item{d1}{\code{POSIXct}, date/time object.} + +\item{d2}{\code{POSIXct}, date/time object.} +} +\value{ +\code{integer} +} +\description{ +This function returns the associated \code{integer} times +for the start of date \code{d1} and the end of date \code{d2}. +} +\examples{ +d1 <- "2017-03-15" +d2 <- "2017-04-15" +intRangePeriod(d1, d2) +intMinDay(d1) +intMaxDay(d2) +} +\seealso{ +Other UtilityFuncs: \code{\link{date2int}}, + \code{\link{int2date}}, \code{\link{intMaxDay}}, + \code{\link{intMinDay}}, \code{\link{intRangeDay}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/isNull-methods.Rd b/man/isNull-methods.Rd new file mode 100644 index 0000000..b3a2c8c --- /dev/null +++ b/man/isNull-methods.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/EllipticCurves.R +\docType{methods} +\name{isNull} +\alias{isNull} +\alias{isNull,ECPOINT-method} +\title{Test for empty EC point} +\usage{ +isNull(x) + +\S4method{isNull}{ECPOINT}(x) +} +\arguments{ +\item{x}{object} +} +\value{ +\code{logical} +} +\description{ +Checks whether an EC point does exist. +} +\references{ +\url{https://en.bitcoin.it/wiki/Secp256k1} +} +\seealso{ +Other EllipticCurve: \code{\link{ECPARAM-class}}, + \code{\link{ECPOINT-class}}, + \code{\link{EcparamOrNull-class}}, + \code{\link{containsPoint}}, \code{\link{ecoperators}}, + \code{\link{ecparam}}, \code{\link{ecpoint}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/listbanned.Rd b/man/listbanned.Rd index 19b275a..5f7e118 100644 --- a/man/listbanned.Rd +++ b/man/listbanned.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{listbanned} -\alias{listbanned} -\title{RPC-JSON API: listbanned} -\usage{ -listbanned(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -List all banned IPs/Subnets. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#listbanned}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{ping}}, - \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{listbanned} +\alias{listbanned} +\title{RPC-JSON API: listbanned} +\usage{ +listbanned(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +List all banned IPs/Subnets. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#listbanned}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{ping}}, + \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/ping.Rd b/man/ping.Rd index b047dfb..05d13cf 100644 --- a/man/ping.Rd +++ b/man/ping.Rd @@ -1,36 +1,36 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{ping} -\alias{ping} -\title{RPC-JSON API: ping} -\usage{ -ping(obj) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -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. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#ping}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{listbanned}}, - \code{\link{setnetworkactive}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{ping} +\alias{ping} +\title{RPC-JSON API: ping} +\usage{ +ping(obj) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +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. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#ping}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{listbanned}}, + \code{\link{setnetworkactive}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/preciousblock.Rd b/man/preciousblock.Rd index b3eb977..28d4d46 100644 --- a/man/preciousblock.Rd +++ b/man/preciousblock.Rd @@ -1,45 +1,45 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{preciousblock} -\alias{preciousblock} -\title{RPC-JSON API: preciousblock} -\usage{ -preciousblock(obj, blockhash) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{blockhash}{\code{character}, the hash of the block to mark as precious.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -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. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#preciousblock}, -\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{pruneblockchain}}, \code{\link{verifychain}}, - \code{\link{verifytxoutproof}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{preciousblock} +\alias{preciousblock} +\title{RPC-JSON API: preciousblock} +\usage{ +preciousblock(obj, blockhash) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{blockhash}{\code{character}, the hash of the block to mark as precious.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +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. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#preciousblock}, +\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{pruneblockchain}}, \code{\link{verifychain}}, + \code{\link{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/pruneblockchain.Rd b/man/pruneblockchain.Rd index 8598bea..9370baf 100644 --- a/man/pruneblockchain.Rd +++ b/man/pruneblockchain.Rd @@ -1,49 +1,49 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{pruneblockchain} -\alias{pruneblockchain} -\title{RPC-JSON API: pruneblockchain} -\usage{ -pruneblockchain(obj, height) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{height}{\code{integer} The block height to prune up to.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Pruning of blockchain. -} -\section{Details}{ - -May be set to a discrete height, or a unix timestamp to prune blocks whose block time -is at least 2 hours older than the provided timestamp. -} - -\references{ -\url{https://bitcoin.org/en/developer-reference#pruneblockchain}, -\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{verifychain}}, - \code{\link{verifytxoutproof}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{pruneblockchain} +\alias{pruneblockchain} +\title{RPC-JSON API: pruneblockchain} +\usage{ +pruneblockchain(obj, height) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{height}{\code{integer} The block height to prune up to.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Pruning of blockchain. +} +\section{Details}{ + +May be set to a discrete height, or a unix timestamp to prune blocks whose block time +is at least 2 hours older than the provided timestamp. +} + +\references{ +\url{https://bitcoin.org/en/developer-reference#pruneblockchain}, +\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{verifychain}}, + \code{\link{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/rpcpost.Rd b/man/rpcpost.Rd index 142ee90..a0d6430 100644 --- a/man/rpcpost.Rd +++ b/man/rpcpost.Rd @@ -1,31 +1,31 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bitcoind.R -\name{rpcpost} -\alias{rpcpost} -\title{HTTP post of RPC-JSON} -\usage{ -rpcpost(obj, api, plist = list()) -} -\arguments{ -\item{obj}{\code{CONRPC} object, returned from \code{conrpc()}.} - -\item{api}{\code{character} the name of the RPC function.} - -\item{plist}{\code{list} a named list object of the parameters for \code{api}} -} -\value{ -A \code{list} object, coerced JSON answer from RPC. -} -\description{ -This function executes an RPC-JSON post. -} -\seealso{ -Other bitcoind functions: \code{\link{ANSRPC-class}}, - \code{\link{CONRPC-class}}, - \code{\link{NullOrCharacter-class}}, - \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, - \code{\link{startbtc}}, \code{\link{stopbtc}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bitcoind.R +\name{rpcpost} +\alias{rpcpost} +\title{HTTP post of RPC-JSON} +\usage{ +rpcpost(obj, api, plist = list()) +} +\arguments{ +\item{obj}{\code{CONRPC} object, returned from \code{conrpc()}.} + +\item{api}{\code{character} the name of the RPC function.} + +\item{plist}{\code{list} a named list object of the parameters for \code{api}} +} +\value{ +A \code{list} object, coerced JSON answer from RPC. +} +\description{ +This function executes an RPC-JSON post. +} +\seealso{ +Other bitcoind functions: \code{\link{ANSRPC-class}}, + \code{\link{CONRPC-class}}, + \code{\link{NullOrCharacter-class}}, + \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, + \code{\link{startbtc}}, \code{\link{stopbtc}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/setnetworkactive.Rd b/man/setnetworkactive.Rd index 6279f39..db84057 100644 --- a/man/setnetworkactive.Rd +++ b/man/setnetworkactive.Rd @@ -1,35 +1,35 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/NetworkRpcs.R -\name{setnetworkactive} -\alias{setnetworkactive} -\title{RPC-JSON API: setnetworkactive} -\usage{ -setnetworkactive(obj, state = TRUE) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{state}{\code{logical} the network state.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Disable/enable all p2p network activity. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#setnetworkactive}, -\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} -} -\seealso{ -Other Network RPCs: \code{\link{addnode}}, - \code{\link{clearbanned}}, \code{\link{disconnectnode}}, - \code{\link{getaddednodeinfo}}, - \code{\link{getconnectioncount}}, - \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, - \code{\link{getpeerinfo}}, \code{\link{listbanned}}, - \code{\link{ping}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/NetworkRpcs.R +\name{setnetworkactive} +\alias{setnetworkactive} +\title{RPC-JSON API: setnetworkactive} +\usage{ +setnetworkactive(obj, state = TRUE) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{state}{\code{logical} the network state.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Disable/enable all p2p network activity. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#setnetworkactive}, +\url{https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs} +} +\seealso{ +Other Network RPCs: \code{\link{addnode}}, + \code{\link{clearbanned}}, \code{\link{disconnectnode}}, + \code{\link{getaddednodeinfo}}, + \code{\link{getconnectioncount}}, + \code{\link{getnettotals}}, \code{\link{getnetworkinfo}}, + \code{\link{getpeerinfo}}, \code{\link{listbanned}}, + \code{\link{ping}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/show-methods.Rd b/man/show-methods.Rd index 4f26934..4948405 100644 --- a/man/show-methods.Rd +++ b/man/show-methods.Rd @@ -1,16 +1,22 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/AllClasses.R -\docType{methods} -\name{show} -\alias{show} -\alias{show,ANSRPC-method} -\title{show-methods} -\usage{ -\S4method{show}{ANSRPC}(object) -} -\arguments{ -\item{object}{a S4-class object.} -} -\description{ -Defined \code{show}-methods for S4-classes. -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\docType{methods} +\name{show} +\alias{show} +\alias{show,ANSRPC-method} +\alias{show,BTCADR-method} +\alias{show,ECPARAM-method} +\title{show-methods} +\usage{ +\S4method{show}{ANSRPC}(object) + +\S4method{show}{BTCADR}(object) + +\S4method{show}{ECPARAM}(object) +} +\arguments{ +\item{object}{a S4-class object.} +} +\description{ +Defined \code{show}-methods for S4-classes. +} diff --git a/man/startbtc.Rd b/man/startbtc.Rd index e89b141..0873caa 100644 --- a/man/startbtc.Rd +++ b/man/startbtc.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bitcoind.R -\name{startbtc} -\alias{startbtc} -\title{Start bitcoind server process} -\usage{ -startbtc(confbtc) -} -\arguments{ -\item{confbtc}{\code{CONRPC} object, returned from \code{conrpc()}.} -} -\value{ -\code{NULL} -} -\description{ -This function does start the bitcoind-server process. -It should only be called when no suitable RPC-JSON -process is running -} -\details{ -The process is started by calling \code{system()}. -Hereby, the options: \code{rpcuser}, \code{rpcpassword} and -\code{conf} are used in the call to \code{bitcoind}. -} -\seealso{ -Other bitcoind functions: \code{\link{ANSRPC-class}}, - \code{\link{CONRPC-class}}, - \code{\link{NullOrCharacter-class}}, - \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, - \code{\link{rpcpost}}, \code{\link{stopbtc}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bitcoind.R +\name{startbtc} +\alias{startbtc} +\title{Start bitcoind server process} +\usage{ +startbtc(confbtc) +} +\arguments{ +\item{confbtc}{\code{CONRPC} object, returned from \code{conrpc()}.} +} +\value{ +\code{NULL} +} +\description{ +This function does start the bitcoind-server process. +It should only be called when no suitable RPC-JSON +process is running +} +\details{ +The process is started by calling \code{system()}. +Hereby, the options: \code{rpcuser}, \code{rpcpassword} and +\code{conf} are used in the call to \code{bitcoind}. +} +\seealso{ +Other bitcoind functions: \code{\link{ANSRPC-class}}, + \code{\link{CONRPC-class}}, + \code{\link{NullOrCharacter-class}}, + \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, + \code{\link{rpcpost}}, \code{\link{stopbtc}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/stopbtc.Rd b/man/stopbtc.Rd index 1ebd584..3f8d0b2 100644 --- a/man/stopbtc.Rd +++ b/man/stopbtc.Rd @@ -1,26 +1,26 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bitcoind.R -\name{stopbtc} -\alias{stopbtc} -\title{Stop bitcoind server process} -\usage{ -stopbtc(confbtc) -} -\arguments{ -\item{confbtc}{\code{CONRPC} object, returned from \code{conrpc()}.} -} -\description{ -This function stops a running bitcoind process. -It calls \code{bitcoin-cli stop} \emph{via} the -R function \code{system()}. -} -\seealso{ -Other bitcoind functions: \code{\link{ANSRPC-class}}, - \code{\link{CONRPC-class}}, - \code{\link{NullOrCharacter-class}}, - \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, - \code{\link{rpcpost}}, \code{\link{startbtc}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bitcoind.R +\name{stopbtc} +\alias{stopbtc} +\title{Stop bitcoind server process} +\usage{ +stopbtc(confbtc) +} +\arguments{ +\item{confbtc}{\code{CONRPC} object, returned from \code{conrpc()}.} +} +\description{ +This function stops a running bitcoind process. +It calls \code{bitcoin-cli stop} \emph{via} the +R function \code{system()}. +} +\seealso{ +Other bitcoind functions: \code{\link{ANSRPC-class}}, + \code{\link{CONRPC-class}}, + \code{\link{NullOrCharacter-class}}, + \code{\link{NullOrInteger-class}}, \code{\link{conrpc}}, + \code{\link{rpcpost}}, \code{\link{startbtc}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/validBtcAdr.Rd b/man/validBtcAdr.Rd new file mode 100644 index 0000000..71fe7d7 --- /dev/null +++ b/man/validBtcAdr.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllClasses.R +\name{validBtcAdr} +\alias{validBtcAdr} +\title{Validate S4-class BTCADR} +\usage{ +validBtcAdr(object) +} +\arguments{ +\item{object}{\code{BTCADR} object} +} +\description{ +This function validates objects of S4-class +\code{BTCADR}. Hereby, checks are conducted +with respect to the first character of the addresses; +their consistency with the net version and +the correspondence of the checksums. +} +\references{ +\url{https://en.bitcoin.it/wiki/Address} +} +\seealso{ +Other BtcAdresses: \code{\link{BTCADR-class}}, + \code{\link{PrivKey2PubKey}}, \code{\link{PrivKey2Wif}}, + \code{\link{PubHash2BtcAdr}}, + \code{\link{PubKey2PubHash}}, \code{\link{Wif2PrivKey}}, + \code{\link{base58CheckDecode}}, + \code{\link{base58CheckEncode}}, \code{\link{concatHex}}, + \code{\link{createBtcAdr}}, + \code{\link{createPrivateKey}}, \code{\link{decodeHex}}, + \code{\link{hash160}}, \code{\link{hash256}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/verifychain.Rd b/man/verifychain.Rd index aebf1f3..4c5b296 100644 --- a/man/verifychain.Rd +++ b/man/verifychain.Rd @@ -1,48 +1,48 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{verifychain} -\alias{verifychain} -\title{RPC-JSON API: verifychain} -\usage{ -verifychain(obj, checklevel = NULL, nblocks = NULL) -} -\arguments{ -\item{obj}{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.} - -\item{nblocks}{\code{integer} (optional, default=6, 0=all), -the number of blocks to check.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -Verifies blockchain database. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#verifychain}, -\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{verifytxoutproof}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{verifychain} +\alias{verifychain} +\title{RPC-JSON API: verifychain} +\usage{ +verifychain(obj, checklevel = NULL, nblocks = NULL) +} +\arguments{ +\item{obj}{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.} + +\item{nblocks}{\code{integer} (optional, default=6, 0=all), +the number of blocks to check.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +Verifies blockchain database. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#verifychain}, +\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{verifytxoutproof}} +} +\author{ +Bernhard Pfaff +} diff --git a/man/verifytxoutproof.Rd b/man/verifytxoutproof.Rd index d8f3334..107be21 100644 --- a/man/verifytxoutproof.Rd +++ b/man/verifytxoutproof.Rd @@ -1,46 +1,46 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BlockchainRpcs.R -\name{verifytxoutproof} -\alias{verifytxoutproof} -\title{RPC-JSON API: verifytxoutproof} -\usage{ -verifytxoutproof(obj, proof) -} -\arguments{ -\item{obj}{object of class \code{CONRPC}.} - -\item{proof}{\code{character} the hex-encoded proof generated -by gettxoutproof.} -} -\value{ -A S4-object of class \code{ANSRPC}. -} -\description{ -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. -} -\references{ -\url{https://bitcoin.org/en/developer-reference#verifytxoutproof}, -\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}} -} -\author{ -Bernhard Pfaff -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BlockchainRpcs.R +\name{verifytxoutproof} +\alias{verifytxoutproof} +\title{RPC-JSON API: verifytxoutproof} +\usage{ +verifytxoutproof(obj, proof) +} +\arguments{ +\item{obj}{object of class \code{CONRPC}.} + +\item{proof}{\code{character} the hex-encoded proof generated +by gettxoutproof.} +} +\value{ +A S4-object of class \code{ANSRPC}. +} +\description{ +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. +} +\references{ +\url{https://bitcoin.org/en/developer-reference#verifytxoutproof}, +\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}} +} +\author{ +Bernhard Pfaff +}