RPC man ZCL->BTCP, errors, links, BTCprivate->BTCPrivate

This commit is contained in:
Jon Layton 2018-02-24 18:32:32 -06:00
parent 72d8e1e494
commit 334c1a5395
25 changed files with 241 additions and 242 deletions

View File

@ -1,19 +1,19 @@
<!--- Remove text and sections that do not apply -->
This issue tracker is only for technical issues related to zcashd.
This issue tracker is only for technical issues related to btcpd.
General Zcash questions and/or support requests and are best directed to the [Zcash Forums](https://forum.z.cash) or [Community Rocket.Chat](https://chat.zcashcommunity.com).
General Bitcoin Private questions and/or support requests and are best directed to the [BTCP Support Website](https://support.btcprivate.org/).
For reporting security vulnerabilities or for sensitive discussions with our security team, please contact [security@z.cash](mailto:security@z.cash). You can use the [GPG key](https://z.cash/gpg-pubkeys/security.asc) (fingerprint: `AF85 0445 546C 18B7 86F9 2C62 88FB 8B86 D8B5 A68C`) to send an encrypted message. The key and fingerprint are duplicated on our [Public Keys page](https://z.cash/support/pubkeys.html).
For reporting Zcash-specific security vulnerabilities or for sensitive discussions with their security team, please contact [security@z.cash](mailto:security@z.cash). You can use the [GPG key](https://z.cash/gpg-pubkeys/security.asc) (fingerprint: `AF85 0445 546C 18B7 86F9 2C62 88FB 8B86 D8B5 A68C`) to send an encrypted message. The key and fingerprint are duplicated on our [Public Keys page](https://z.cash/support/pubkeys.html).
### Describe the issue
Please provide a general summary of the issue you're experiencing
### Can you reliably reproduce the issue?
#### If so, please list the steps to reproduce below:
1.
2.
3.
1.
2.
3.
### Expected behaviour
Tell us what should happen
@ -21,8 +21,8 @@ Tell us what should happen
### Actual behaviour + errors
Tell us what happens instead including any noticable error output (any messages displayed on-screen when e.g. a crash occurred)
### The version of Zcash you were using:
Run `zcashd --version` to find out
### The version of Bitcoin Private you were using:
Run `btpcd --version` to find out
### Machine specs:
- OS name + version:
@ -34,9 +34,9 @@ Run `zcashd --version` to find out
- Compiler version (gcc -version):
### Any extra information that might be useful in the debugging process.
This includes the relevant contents of `~/.zcash/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
This includes the relevant contents of `~/.btcprivate/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable.
### Do you have a back up of `~/.zcash` directory and/or take a VM snapshot?
- Backing up / making a copy of the `~/.zcash` directory might help make the problem reproducible. Please redact appropriately.
### Do you have a back up of `~/.btcprivate` directory and/or take a VM snapshot?
- Backing up / making a copy of the `~/.btcprivate` directory might help make the problem reproducible. Please redact appropriately.
- Taking a VM snapshot is really helpful for interactively testing fixes

2
.gitignore vendored
View File

@ -57,6 +57,8 @@ src/univalue/gen
*.o
*.o-*
.zcash
.zclassic
.btcprivate
*.a
*.pb.cc
*.pb.h

View File

@ -1,6 +1,6 @@
Copyright (c) 2017 The Bitcoin Private developers
Copyright (c) 2016-2017 The ZClassic developers
Copyright (c) 2016-2017 The ZCash developers
Copyright (c) 2017-2018 The Bitcoin Private developers
Copyright (c) 2016-2017 The Zclassic developers
Copyright (c) 2016-2017 The Zcash developers
Copyright (c) 2009-2017 The Bitcoin Core developers
Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -34,24 +34,24 @@ $0 --help
Show this help message and exit.
$0 [ --enable-lcov || --disable-tests ] [ --disable-mining ] [ --disable-rust ] [ --enable-proton ] [ --disable-libs ] [ MAKEARGS... ]
Build Zcash and most of its transitive dependencies from
source. MAKEARGS are applied to both dependencies and Zcash itself.
Build Bitcoin Private and most of its transitive dependencies from
source. MAKEARGS are applied to both dependencies and Bitcoin Private itself.
If --enable-lcov is passed, Zcash is configured to add coverage
If --enable-lcov is passed, Bitcoin Private is configured to add coverage
instrumentation, thus enabling "make cov" to work.
If --disable-tests is passed instead, the Zcash tests are not built.
If --disable-tests is passed instead, the Bitcoin Private tests are not built.
If --disable-mining is passed, Zcash is configured to not build any mining
If --disable-mining is passed, Bitcoin Private is configured to not build any mining
code. It must be passed after the test arguments, if present.
If --disable-rust is passed, Zcash is configured to not build any Rust language
If --disable-rust is passed, Bitcoin Private is configured to not build any Rust language
assets. It must be passed after test/mining arguments, if present.
If --enable-proton is passed, Zcash is configured to build the Apache Qpid Proton
If --enable-proton is passed, Bitcoin Private is configured to build the Apache Qpid Proton
library required for AMQP support. This library is not built by default.
It must be passed after the test/mining/Rust arguments, if present.
If --disable-libs is passed, Zcash is configured to not build any libraries like
If --disable-libs is passed, Bitcoin Private is configured to not build any libraries like
'libzcashconsensus'.
EOF
exit 0

View File

@ -75,11 +75,11 @@ function main() {
|| exit_locked_error
cat <<EOF
BTCPrivate - fetch-params.sh
Bitcoin Private - fetch-params.sh
This script will fetch the BTCPrivate zkSNARK parameters and verify their
integrity with sha256sum. These parameters are identical to those for
both ZClassic and ZCash.
This script will fetch the Bitcoin Private (and Zcash) zkSNARK parameters, and verify
their integrity with sha256sum. These parameters are identical to those for
both Zclassic and Zcash.
If they already exist locally, it will exit now and do nothing else.
EOF
@ -90,7 +90,7 @@ EOF
mkdir -p "$PARAMS_DIR"
README_PATH="$PARAMS_DIR/README"
cat >> "$README_PATH" <<EOF
This directory stores common BTCPrivate zkSNARK parameters. Note that it is
This directory stores common Bitcoin Private zkSNARK parameters. Note that it is
distinct from the daemon's -datadir argument because the parameters are
large and may be shared across multiple distinct -datadir's such as when
setting up test networks.

View File

@ -83,10 +83,10 @@ function main() {
|| exit_locked_error
cat <<EOF
Zcash - fetch-params.sh
Bitcoin Private - fetch-params.sh
This script will fetch the Zcash zkSNARK parameters and verify their
integrity with sha256sum.
This script will fetch the Bitcoin Private (and Zcash) zkSNARK parameters and
verify their integrity with sha256sum.
If they already exist locally, it will exit now and do nothing else.
EOF
@ -97,7 +97,7 @@ EOF
mkdir -p "$PARAMS_DIR"
README_PATH="$PARAMS_DIR/README"
cat >> "$README_PATH" <<EOF
This directory stores common Zcash zkSNARK parameters. Note that it is
This directory stores common Bitcoin Private zkSNARK parameters. Note that it is
distinct from the daemon's -datadir argument because the parameters are
large and may be shared across multiple distinct -datadir's such as when
setting up test networks.
@ -125,15 +125,13 @@ EOF
main
rm -f /tmp/fetch_params.lock
if [ ! -f "$HOME/Library/Application Support/BTCprivate/btcprivate.conf" ]; then
if [ ! -f "$HOME/Library/Application Support/BTCPrivate/btcprivate.conf" ]; then
echo "Creating btcprivate.conf"
mkdir -p "$HOME/Library/Application Support/BTCprivate/"
echo "rpcuser=zcashrpc" > ~/Library/Application\ Support/BTCprivate/btcprivate.conf
mkdir -p "$HOME/Library/Application Support/BTCPrivate/"
echo "rpcuser=btcprpc" > ~/Library/Application\ Support/BTCPrivate/btcprivate.conf
PASSWORD=$(cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
echo "rpcpassword=$PASSWORD" >> "$HOME/Library/Application Support/BTCprivate/btcprivate.conf"
echo "rpcpassword=$PASSWORD" >> "$HOME/Library/Application Support/BTCPrivate/btcprivate.conf"
echo "Complete!"
fi
exit 0

View File

@ -40,7 +40,7 @@ else
CXXFLAGS_overridden=no
fi
# Zcash requries C++11 compatibility; set it early:
# Bitcoin Private / Zcash requries C++11 compatibility; set it early:
CXXFLAGS="-std=c++11 $CXXFLAGS"
AC_PROG_CXX

View File

@ -1,12 +1,12 @@
Expectations for DNS Seed operators
====================================
Zcash attempts to minimize the level of trust in DNS seeds,
Bitcoin Private attempts to minimize the level of trust in DNS seeds,
but DNS seeds still pose a small amount of risk for the network.
As such, DNS seeds must be run by entities which have some minimum
level of trust within the Zcash community.
level of trust within the BTCP community.
Other implementations of Zcash software may also use the same
Other implementations of BTCP software may also use the same
seeds and may be more exposed. In light of this exposure, this
document establishes some basic expectations for operating DNS seeds.
@ -16,7 +16,7 @@ and not sell or transfer control of the DNS seed. Any hosting services
contracted by the operator are equally expected to uphold these expectations.
1. The DNS seed results must consist exclusively of fairly selected and
functioning Zcash nodes from the public network to the best of the
functioning BTCP nodes from the public network to the best of the
operator's understanding and capability.
2. For the avoidance of doubt, the results may be randomized but must not
@ -26,7 +26,7 @@ urgent technical necessity and disclosed.
3. The results may not be served with a DNS TTL of less than one minute.
4. Any logging of DNS queries should be only that which is necessary
for the operation of the service or urgent health of the Zcash
for the operation of the service or urgent health of the BTCP
network and must not be retained longer than necessary nor disclosed
to any third party.
@ -42,8 +42,8 @@ details of their operating practices.
related to the DNS seed operation.
If these expectations cannot be satisfied the operator should discontinue
providing services and contact the active Zcash development team as well as
creating an issue in the [Zcash repository](https://github.com/zcash/zcash).
providing services and contact the active BTCP development team as well as
creating an issue in the [Bitcoin Private repository](https://github.com/BTCPrivate/BitcoinPrivate).
Behavior outside of these expectations may be reasonable in some
situations but should be discussed in public in advance.

View File

@ -5,8 +5,8 @@ connections, inter-process communication, and shared-memory,
providing various message-oriented semantics such as publish/subcribe,
request/reply, and push/pull.
The Zcash daemon can be configured to act as a trusted "border
router", implementing the zcash wire protocol and relay, making
The BTCP daemon can be configured to act as a trusted "border
router", implementing the btcp/zcash wire protocol and relay, making
consensus decisions, maintaining the local blockchain database,
broadcasting locally generated transactions into the network, and
providing a queryable RPC interface to interact on a polled basis for
@ -33,7 +33,7 @@ buffering or reassembly.
## Prerequisites
The ZeroMQ feature in Zcash requires ZeroMQ API version 4.x or
The ZeroMQ feature in Bitcoin Private requires ZeroMQ API version 4.x or
newer, which you will need to install if you are not using the depends
system. Typically, it is packaged by distributions as something like
*libzmq5-dev*. The C++ wrapper for ZeroMQ is *not* needed.

View File

@ -27,5 +27,5 @@ CAmount CFeeRate::GetFee(size_t nSize) const
std::string CFeeRate::ToString() const
{
return strprintf("%d.%08d BTC/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
return strprintf("%d.%08d BTCP/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
}

View File

@ -44,10 +44,10 @@ static bool AppInitRawTx(int argc, char* argv[])
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help"))
{
// First part of help message is specific to this utility
std::string strUsage = _("Zcash zcash-tx utility version") + " " + FormatFullVersion() + "\n\n" +
std::string strUsage = _("BTCP zcash-tx utility version") + " " + FormatFullVersion() + "\n\n" +
_("Usage:") + "\n" +
" zcash-tx [options] <hex-tx> [commands] " + _("Update hex-encoded zcash transaction") + "\n" +
" zcash-tx [options] -create [commands] " + _("Create hex-encoded zcash transaction") + "\n" +
" zcash-tx [options] <hex-tx> [commands] " + _("Update hex-encoded BTCP transaction") + "\n" +
" zcash-tx [options] -create [commands] " + _("Create hex-encoded BTCP transaction") + "\n" +
"\n";
fprintf(stdout, "%s", strUsage.c_str());

View File

@ -73,7 +73,7 @@ bool AppInit(int argc, char* argv[])
// Process help and version before taking care about datadir
if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
{
std::string strUsage = _("Zcash Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();
std::string strUsage = _("Bitcoin Private Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();
if (mapArgs.count("-version"))
{
@ -82,7 +82,7 @@ bool AppInit(int argc, char* argv[])
else
{
strUsage += "\n" + _("Usage:") + "\n" +
" btcpd [options] " + _("Start Zcash Daemon") + "\n";
" btcpd [options] " + _("Start BTCP Daemon") + "\n";
strUsage += "\n" + HelpMessage(HMM_BITCOIND);
}
@ -144,7 +144,7 @@ bool AppInit(int argc, char* argv[])
fDaemon = GetBoolArg("-daemon", false);
if (fDaemon)
{
fprintf(stdout, "Zcash server starting\n");
fprintf(stdout, "BTCP server starting\n");
// Daemonize
pid_t pid = fork();

View File

@ -49,7 +49,7 @@ TEST(Miner, GetMinerScriptPubKey) {
EXPECT_FALSE((bool) scriptPubKey);
// Partial address
mapArgs["-mineraddress"] = "t1T8yaLVhNqxA5KJcmiqq";
mapArgs["-mineraddress"] = "b1T8yaLVhNqxA5KJcmiqq";
#ifdef ENABLE_WALLET
scriptPubKey = GetMinerScriptPubKey(reservekey);
#else
@ -58,7 +58,7 @@ TEST(Miner, GetMinerScriptPubKey) {
EXPECT_FALSE((bool) scriptPubKey);
// Typo in address
mapArgs["-mineraddress"] = "t1TByaLVhNqxA5KJcmiqqFN88e8DNp2PBfF";
mapArgs["-mineraddress"] = "b1TByaLVhNqxA5KJcmiqqFN88e8DNp2PBfF";
#ifdef ENABLE_WALLET
scriptPubKey = GetMinerScriptPubKey(reservekey);
#else
@ -72,7 +72,7 @@ TEST(Miner, GetMinerScriptPubKey) {
CScript expectedScriptPubKey = CScript() << OP_DUP << OP_HASH160 << ToByteVector(keyID) << OP_EQUALVERIFY << OP_CHECKSIG;
// Valid address
mapArgs["-mineraddress"] = "t1T8yaLVhNqxA5KJcmiqqFN88e8DNp2PBfF";
mapArgs["-mineraddress"] = "b1T8yaLVhNqxA5KJcmiqqFN88e8DNp2PBfF";
#ifdef ENABLE_WALLET
scriptPubKey = GetMinerScriptPubKey(reservekey);
#else
@ -92,7 +92,7 @@ TEST(Miner, GetMinerScriptPubKey) {
EXPECT_EQ(expectedScriptPubKey, *scriptPubKey);
// Valid address with trailing whitespace
mapArgs["-mineraddress"] = "t1T8yaLVhNqxA5KJcmiqqFN88e8DNp2PBfF ";
mapArgs["-mineraddress"] = "b1T8yaLVhNqxA5KJcmiqqFN88e8DNp2PBfF ";
#ifdef ENABLE_WALLET
scriptPubKey = GetMinerScriptPubKey(reservekey);
#else

View File

@ -409,9 +409,9 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-disablewallet", _("Do not load the wallet and disable wallet RPC calls"));
strUsage += HelpMessageOpt("-keypool=<n>", strprintf(_("Set key pool size to <n> (default: %u)"), 100));
if (showDebug)
strUsage += HelpMessageOpt("-mintxfee=<amt>", strprintf("Fees (in BTC/KB) smaller than this are considered zero fee for transaction creation (default: %s)",
strUsage += HelpMessageOpt("-mintxfee=<amt>", strprintf("Fees (in BTCP/kB) smaller than this are considered zero fee for transaction creation (default: %s)",
FormatMoney(CWallet::minTxFee.GetFeePerK())));
strUsage += HelpMessageOpt("-paytxfee=<amt>", strprintf(_("Fee (in BTC/KB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())));
strUsage += HelpMessageOpt("-paytxfee=<amt>", strprintf(_("Fee (in BTCP/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())));
strUsage += HelpMessageOpt("-rescan", _("Rescan the blockchain for missing wallet transactions") + " " + _("on startup"));
strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup"));
strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0));
@ -469,7 +469,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-relaypriority", strprintf("Require high priority for relaying free or low-fee transactions (default: %u)", 0));
strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf("Limit size of signature cache to <n> entries (default: %u)", 50000));
}
strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in BTC/KB) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())));
strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in BTCP/kB) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())));
strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
if (showDebug)
{
@ -493,8 +493,8 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-blockversion=<n>", "Override block version to test forking scenarios");
#ifdef FORK_CB_INPUT
strUsage += HelpMessageGroup(_("Fork :"));
strUsage += HelpMessageOpt("-utxo-path=<path>", _("Specify location of utxo files"));
strUsage += HelpMessageGroup(_("Fork:"));
strUsage += HelpMessageOpt("-utxo-path=<path>", _("Specify location of UTXO files"));
#endif
#ifdef ENABLE_MINING
@ -691,7 +691,7 @@ static void ZC_LoadParams()
uiInterface.ThreadSafeMessageBox(strprintf(
_("Cannot find the Bitcoin Private network parameters in the following directory:\n"
"%s\n"
"Please run 'zcash-fetch-params' or './btcp/fetch-params.sh' and then restart."),
"Please run 'zcash-fetch-params' or './btcputil/fetch-params.sh' and then restart."),
ZC_GetParamsDir()),
"", CClientUIInterface::MSG_ERROR);
StartShutdown();

View File

@ -47,7 +47,7 @@ double GetDifficultyINTERNAL(const CBlockIndex* blockindex, bool networkDifficul
int nShiftAmount = (powLimit >> 24) & 0xff;
double dDiff =
(double)(powLimit & 0x00ffffff) /
(double)(powLimit & 0x00ffffff) /
(double)(bits & 0x00ffffff);
while (nShift < nShiftAmount)
@ -510,7 +510,7 @@ UniValue gettxout(const UniValue& params, bool fHelp)
"{\n"
" \"bestblock\" : \"hash\", (string) the block hash\n"
" \"confirmations\" : n, (numeric) The number of confirmations\n"
" \"value\" : x.xxx, (numeric) The transaction value in btc\n"
" \"value\" : x.xxx, (numeric) The transaction value in BTCP\n"
" \"scriptPubKey\" : { (json object)\n"
" \"asm\" : \"code\", (string) \n"
" \"hex\" : \"hex\", (string) \n"

View File

@ -958,8 +958,8 @@ UniValue getblocksubsidy(const UniValue& params, bool fHelp)
"1. height (numeric, optional) The block height. If not provided, defaults to the current height of the chain.\n"
"\nResult:\n"
"{\n"
" \"miner\" : x.xxx (numeric) The mining reward amount in ZEC.\n"
" \"founders\" : x.xxx (numeric) The founders reward amount in ZEC.\n"
" \"miner\" : x.xxx (numeric) The mining reward amount in BTCP.\n"
" \"founders\" : x.xxx (numeric) The founders reward amount in BTCP - None.\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getblocksubsidy", "1000")

View File

@ -61,8 +61,8 @@ UniValue getinfo(const UniValue& params, bool fHelp)
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
" \"paytxfee\": x.xxxx, (numeric) the transaction fee set in btc/kb\n"
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
" \"paytxfee\": x.xxxx, (numeric) the transaction fee set in BTCP/kB\n"
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in BTCP/kB\n"
" \"errors\": \"...\" (string) any error messages\n"
"}\n"
"\nExamples:\n"
@ -356,9 +356,9 @@ UniValue createmultisig(const UniValue& params, bool fHelp)
"\nExamples:\n"
"\nCreate a multisig address from 2 addresses\n"
+ HelpExampleCli("createmultisig", "2 \"[\\\"t16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"t171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") +
+ HelpExampleCli("createmultisig", "2 \"[\\\"b16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"b171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") +
"\nAs a json rpc call\n"
+ HelpExampleRpc("createmultisig", "2, \"[\\\"t16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"t171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"")
+ HelpExampleRpc("createmultisig", "2, \"[\\\"b16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"b171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"")
;
throw runtime_error(msg);
}
@ -391,11 +391,11 @@ UniValue verifymessage(const UniValue& params, bool fHelp)
"\nUnlock the wallet for 30 seconds\n"
+ HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") +
"\nCreate the signature\n"
+ HelpExampleCli("signmessage", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"my message\"") +
+ HelpExampleCli("signmessage", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"my message\"") +
"\nVerify the signature\n"
+ HelpExampleCli("verifymessage", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"signature\" \"my message\"") +
+ HelpExampleCli("verifymessage", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"signature\" \"my message\"") +
"\nAs json rpc\n"
+ HelpExampleRpc("verifymessage", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", \"signature\", \"my message\"")
+ HelpExampleRpc("verifymessage", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", \"signature\", \"my message\"")
);
LOCK(cs_main);

View File

@ -421,7 +421,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
" }\n"
" ,...\n"
" ],\n"
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in BTCP/kB\n"
" \"localaddresses\": [ (array) list of local addresses\n"
" {\n"
" \"address\": \"xxxx\", (string) network address\n"

View File

@ -204,7 +204,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
" ],\n"
" \"vout\" : [ (array of json objects)\n"
" {\n"
" \"value\" : x.xxx, (numeric) The value in btc\n"
" \"value\" : x.xxx, (numeric) The value in BTCP\n"
" \"n\" : n, (numeric) index\n"
" \"scriptPubKey\" : { (json object)\n"
" \"asm\" : \"asm\", (string) the asm\n"
@ -221,8 +221,8 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
" ],\n"
" \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n"
" {\n"
" \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n"
" \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n"
" \"vpub_old\" : x.xxx, (numeric) public input value in BTCP\n"
" \"vpub_new\" : x.xxx, (numeric) public output value in BTCP\n"
" \"anchor\" : \"hex\", (string) the anchor\n"
" \"nullifiers\" : [ (json array of string)\n"
" \"hex\" (string) input note nullifier\n"
@ -289,7 +289,7 @@ UniValue gettxoutproof(const UniValue& params, bool fHelp)
"gettxoutproof [\"txid\",...] ( blockhash )\n"
"\nReturns a hex-encoded proof that \"txid\" was included in a block.\n"
"\nNOTE: By default this function only works sometimes. This is when there is an\n"
"unspent output in the utxo for this transaction. To make it always work,\n"
"unspent output in the UTXO for this transaction. To make it always work,\n"
"you need to maintain a transaction index, using the -txindex command line option or\n"
"specify the block in which the transaction is included in manually (by blockhash).\n"
"\nReturn the raw transaction data.\n"
@ -417,7 +417,7 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp)
" ]\n"
"2. \"addresses\" (string, required) a json object with addresses as keys and amounts as values\n"
" {\n"
" \"address\": x.xxx (numeric, required) The key is the bitcoin address, the value is the btc amount\n"
" \"address\": x.xxx (numeric, required) The key is the bitcoin address, the value is the BTCP amount\n"
" ,...\n"
" }\n"
@ -504,7 +504,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
" ],\n"
" \"vout\" : [ (array of json objects)\n"
" {\n"
" \"value\" : x.xxx, (numeric) The value in btc\n"
" \"value\" : x.xxx, (numeric) The value in BTCP\n"
" \"n\" : n, (numeric) index\n"
" \"scriptPubKey\" : { (json object)\n"
" \"asm\" : \"asm\", (string) the asm\n"
@ -512,7 +512,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
" \"reqSigs\" : n, (numeric) The required sigs\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
" \"addresses\" : [ (json array of string)\n"
" \"t12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc\" (string) bitcoin address\n"
" \"b12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc\" (string) address\n"
" ,...\n"
" ]\n"
" }\n"
@ -521,8 +521,8 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
" ],\n"
" \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n"
" {\n"
" \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n"
" \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n"
" \"vpub_old\" : x.xxx, (numeric) public input value in BTCP\n"
" \"vpub_new\" : x.xxx, (numeric) public output value in BTCP\n"
" \"anchor\" : \"hex\", (string) the anchor\n"
" \"nullifiers\" : [ (json array of string)\n"
" \"hex\" (string) input note nullifier\n"

View File

@ -1,6 +1,6 @@
[
[
"t1T8yaLVhNqxA5KJcmiqqFN88e8DNp2PBfF",
"b1T8yaLVhNqxA5KJcmiqqFN88e8DNp2PBfF",
"65a16059864a2fdbc7c99a4723a8395bc6f188eb",
{
"addrType": "pubkey",
@ -72,7 +72,7 @@
}
],
[
"t1TpfguJj5zxKUfWcsNTrh6eod2XXsTKtvB",
"b1TpfguJj5zxKUfWcsNTrh6eod2XXsTKtvB",
"6d23156cbbdcc82a5a47eee4c2c7c583c18b6bf4",
{
"addrType": "pubkey",
@ -144,7 +144,7 @@
}
],
[
"t1UxCT4RrCbGH36etfQaPF1svNtZVhsqs5A",
"b1UxCT4RrCbGH36etfQaPF1svNtZVhsqs5A",
"7987ccaa53d02c8873487ef919677cd3db7a6912",
{
"addrType": "pubkey",
@ -216,7 +216,7 @@
}
],
[
"t1ZiM4oLF7hvboF4LPqhbBg7RLgJCCJC6Tj",
"b1ZiM4oLF7hvboF4LPqhbBg7RLgJCCJC6Tj",
"adc1cc2081a27206fae25792f28bbc55b831549d",
{
"addrType": "pubkey",
@ -288,7 +288,7 @@
}
],
[
"t1boxWWuUs3dVUFeUMiPqCdwD4QtL1AMx9G",
"b1boxWWuUs3dVUFeUMiPqCdwD4QtL1AMx9G",
"c4c1b72491ede1eedaca00618407ee0b772cad0d",
{
"addrType": "pubkey",
@ -360,7 +360,7 @@
}
],
[
"t1SWDbHDTatR1ag8yTFLdVWd1erfu7Pbbjk",
"b1SWDbHDTatR1ag8yTFLdVWd1erfu7Pbbjk",
"5eadaf9bb7121f0f192561a5a62f5e5f54210292",
{
"addrType": "pubkey",
@ -432,7 +432,7 @@
}
],
[
"t1Lgcj4m5r7eDWctWQM7ete85hHivQxMjBZ",
"b1Lgcj4m5r7eDWctWQM7ete85hHivQxMjBZ",
"1ed467017f043e91ed4c44b4e8dd674db211c4e6",
{
"addrType": "pubkey",

View File

@ -25,13 +25,13 @@ static const string strSecret1 ("5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmF
static const string strSecret2 ("5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3");
static const string strSecret1C ("Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw");
static const string strSecret2C ("L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g");
static const CBitcoinAddress addr1 ("t1h8SqgtM3QM5e2M8EzhhT1yL2PXXtA6oqe");
static const CBitcoinAddress addr2 ("t1Xxa5ZVPKvs9bGMn7aWTiHjyHvR31XkUst");
static const CBitcoinAddress addr1C("t1ffus9J1vhxvFqLoExGBRPjE7BcJxiSCTC");
static const CBitcoinAddress addr2C("t1VJL2dPUyXK7avDRGqhqQA5bw2eEMdhyg6");
static const CBitcoinAddress addr1 ("b1h8SqgtM3QM5e2M8EzhhT1yL2PXXtA6oqe");
static const CBitcoinAddress addr2 ("b1Xxa5ZVPKvs9bGMn7aWTiHjyHvR31XkUst");
static const CBitcoinAddress addr1C("b1ffus9J1vhxvFqLoExGBRPjE7BcJxiSCTC");
static const CBitcoinAddress addr2C("b1VJL2dPUyXK7avDRGqhqQA5bw2eEMdhyg6");
static const string strAddressBad("t1aMkLwU1LcMZYN7TgXUJAwzA1r44dbLkSp");
static const string strAddressBad("b1aMkLwU1LcMZYN7TgXUJAwzA1r44dbLkSp");
#ifdef KEY_TESTS_DUMPINFO

View File

@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(subsidy_limit_test)
}
// Changing the block interval from 10 to 2.5 minutes causes truncation
// effects to occur earlier (from the 9th halving interval instead of the
// 11th), decreasing the total monetary supply by 0.0693 ZEC. If the
// 11th), decreasing the total monetary supply by 0.0693 BTCP. If the
// transaction output field is widened, this discrepancy will become smaller
// or disappear entirely.
//BOOST_CHECK_EQUAL(nSum, 2099999997690000ULL);

View File

@ -444,13 +444,13 @@ void PrintExceptionContinue(const std::exception* pex, const char* pszThread)
boost::filesystem::path GetDefaultDataDir()
{
namespace fs = boost::filesystem;
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Zcash
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Zcash
// Mac: ~/Library/Application Support/Zcash
// Unix: ~/.zcash
// Windows < Vista: C:\Documents and Settings\Username\Application Data\BTCPrivate
// Windows >= Vista: C:\Users\Username\AppData\Roaming\BTCPrivate
// Mac: ~/Library/Application Support/BTCPrivate
// Unix: ~/.btcprivate
#ifdef WIN32
// Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "BTCprivate";
return GetSpecialFolderPath(CSIDL_APPDATA) / "BTCPrivate";
#else
fs::path pathRet;
char* pszHome = getenv("HOME");
@ -462,7 +462,7 @@ boost::filesystem::path GetDefaultDataDir()
// Mac
pathRet /= "Library/Application Support";
TryCreateDirectory(pathRet);
return pathRet / "BTCprivate";
return pathRet / "BTCPrivate";
#else
// Unix
return pathRet / ".btcprivate";
@ -900,7 +900,8 @@ std::string LicenseInfo()
return "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2015-%i The Zcash Developers"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2015-%i zdeveloper.org"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2015-%i The Zclassic Developers"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2017-%i The Bitcoin Private Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(_("This is experimental software.")) + "\n" +
"\n" +
@ -918,4 +919,3 @@ int GetNumCores()
return boost::thread::hardware_concurrency();
#endif
}

View File

@ -64,7 +64,7 @@ std::string DecodeDumpString(const std::string &str) {
for (unsigned int pos = 0; pos < str.length(); pos++) {
unsigned char c = str[pos];
if (c == '%' && pos+2 < str.length()) {
c = (((str[pos+1]>>6)*9+((str[pos+1]-'0')&15)) << 4) |
c = (((str[pos+1]>>6)*9+((str[pos+1]-'0')&15)) << 4) |
((str[pos+2]>>6)*9+((str[pos+2]-'0')&15));
pos += 2;
}
@ -77,13 +77,13 @@ UniValue importprivkey(const UniValue& params, bool fHelp)
{
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
if (fHelp || params.size() < 1 || params.size() > 3)
throw runtime_error(
"importprivkey \"zcashprivkey\" ( \"label\" rescan )\n"
"importprivkey \"btcpprivkey\" ( \"label\" rescan )\n"
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
"\nArguments:\n"
"1. \"zcashprivkey\" (string, required) The private key (see dumpprivkey)\n"
"1. \"btcpprivkey\" (string, required) The private key (see dumpprivkey)\n"
"2. \"label\" (string, optional, default=\"\") An optional label\n"
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
"\nNote: This call can take minutes to complete if rescan is true.\n"
@ -151,7 +151,7 @@ UniValue importaddress(const UniValue& params, bool fHelp)
{
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
if (fHelp || params.size() < 1 || params.size() > 3)
throw runtime_error(
"importaddress \"address\" ( \"label\" rescan )\n"
@ -181,7 +181,7 @@ UniValue importaddress(const UniValue& params, bool fHelp)
std::vector<unsigned char> data(ParseHex(params[0].get_str()));
script = CScript(data.begin(), data.end());
} else {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address or script");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BTCP address or script");
}
string strLabel = "";
@ -247,7 +247,7 @@ UniValue importwallet(const UniValue& params, bool fHelp)
{
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
if (fHelp || params.size() != 1)
throw runtime_error(
"importwallet \"filename\"\n"
@ -297,7 +297,7 @@ UniValue importwallet_impl(const UniValue& params, bool fHelp, bool fImportZKeys
if (vstr.size() < 2)
continue;
// Let's see if the address is a valid Zcash spending key
// Let's see if the address is a valid BTCP spending key
if (fImportZKeys) {
try {
CZCSpendingKey spendingkey(vstr[0]);
@ -320,7 +320,7 @@ UniValue importwallet_impl(const UniValue& params, bool fHelp, bool fImportZKeys
}
catch (const std::runtime_error &e) {
LogPrint("zrpc","Importing detected an error: %s\n", e.what());
// Not a valid spending key, so carry on and see if it's a Zcash style address.
// Not a valid spending key, so carry on and see if it's a BTCP style address.
}
}
@ -384,14 +384,14 @@ UniValue dumpprivkey(const UniValue& params, bool fHelp)
{
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
if (fHelp || params.size() != 1)
throw runtime_error(
"dumpprivkey \"zcashaddress\"\n"
"\nReveals the private key corresponding to 'zcashaddress'.\n"
"dumpprivkey \"btcpaddress\"\n"
"\nReveals the private key corresponding to 'btcpaddress'.\n"
"Then the importprivkey can be used with this output\n"
"\nArguments:\n"
"1. \"zcashaddress\" (string, required) The zcash address for the private key\n"
"1. \"btcpaddress\" (string, required) The btcp address for the private key\n"
"\nResult:\n"
"\"key\" (string) The private key\n"
"\nExamples:\n"
@ -407,7 +407,7 @@ UniValue dumpprivkey(const UniValue& params, bool fHelp)
string strAddress = params[0].get_str();
CBitcoinAddress address;
if (!address.SetString(strAddress))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BTCP address");
CKeyID keyID;
if (!address.GetKeyID(keyID))
throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key");
@ -423,7 +423,7 @@ UniValue z_exportwallet(const UniValue& params, bool fHelp)
{
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
if (fHelp || params.size() != 1)
throw runtime_error(
"z_exportwallet \"filename\"\n"
@ -502,7 +502,7 @@ UniValue dumpwallet_impl(const UniValue& params, bool fHelp, bool fDumpZKeys)
std::sort(vKeyBirth.begin(), vKeyBirth.end());
// produce output
file << strprintf("# Wallet dump created by Zcash %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
file << strprintf("# Wallet dump created by Bitcoin Private %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime()));
file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString());
file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime()));
@ -680,4 +680,3 @@ UniValue z_exportkey(const UniValue& params, bool fHelp)
CZCSpendingKey spendingkey(k);
return spendingkey.ToString();
}

View File

@ -114,11 +114,11 @@ UniValue getnewaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"getnewaddress ( \"account\" )\n"
"\nReturns a new Zcash address for receiving payments.\n"
"\nReturns a new BTCP address for receiving payments.\n"
"\nArguments:\n"
"1. \"account\" (string, optional) DEPRECATED. If provided, it MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"\"zcashaddress\" (string) The new zcash address\n"
"\"btcpaddress\" (string) The new BTCP address\n"
"\nExamples:\n"
+ HelpExampleCli("getnewaddress", "")
+ HelpExampleRpc("getnewaddress", "")
@ -191,11 +191,11 @@ UniValue getaccountaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() != 1)
throw runtime_error(
"getaccountaddress \"account\"\n"
"\nDEPRECATED. Returns the current Zcash address for receiving payments to this account.\n"
"\nDEPRECATED. Returns the current BTCP address for receiving payments to this account.\n"
"\nArguments:\n"
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"\"zcashaddress\" (string) The account zcash address\n"
"\"btcpaddress\" (string) The account BTCP address\n"
"\nExamples:\n"
+ HelpExampleCli("getaccountaddress", "")
+ HelpExampleCli("getaccountaddress", "\"\"")
@ -223,7 +223,7 @@ UniValue getrawchangeaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"getrawchangeaddress\n"
"\nReturns a new Zcash address, for receiving change.\n"
"\nReturns a new BTCP address, for receiving change.\n"
"This is for use with raw transactions, NOT normal use.\n"
"\nResult:\n"
"\"address\" (string) The address\n"
@ -257,21 +257,21 @@ UniValue setaccount(const UniValue& params, bool fHelp)
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"setaccount \"zcashaddress\" \"account\"\n"
"setaccount \"btcpaddress\" \"account\"\n"
"\nDEPRECATED. Sets the account associated with the given address.\n"
"\nArguments:\n"
"1. \"zcashaddress\" (string, required) The zcash address to be associated with an account.\n"
"1. \"btcpaddress\" (string, required) The BTCP address to be associated with an account.\n"
"2. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nExamples:\n"
+ HelpExampleCli("setaccount", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"tabby\"")
+ HelpExampleRpc("setaccount", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", \"tabby\"")
+ HelpExampleCli("setaccount", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"tabby\"")
+ HelpExampleRpc("setaccount", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", \"tabby\"")
);
LOCK2(cs_main, pwalletMain->cs_wallet);
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BTCP address");
string strAccount;
if (params.size() > 1)
@ -303,22 +303,22 @@ UniValue getaccount(const UniValue& params, bool fHelp)
if (fHelp || params.size() != 1)
throw runtime_error(
"getaccount \"zcashaddress\"\n"
"getaccount \"btcpaddress\"\n"
"\nDEPRECATED. Returns the account associated with the given address.\n"
"\nArguments:\n"
"1. \"zcashaddress\" (string, required) The zcash address for account lookup.\n"
"1. \"btcpaddress\" (string, required) The BTCP address for account lookup.\n"
"\nResult:\n"
"\"accountname\" (string) the account address\n"
"\nExamples:\n"
+ HelpExampleCli("getaccount", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"")
+ HelpExampleRpc("getaccount", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"")
+ HelpExampleCli("getaccount", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"")
+ HelpExampleRpc("getaccount", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"")
);
LOCK2(cs_main, pwalletMain->cs_wallet);
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BTCP address");
string strAccount;
map<CTxDestination, CAddressBookData>::iterator mi = pwalletMain->mapAddressBook.find(address.Get());
@ -341,7 +341,7 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp)
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"[ (json array of string)\n"
" \"zcashaddress\" (string) a zcash address associated with the given account\n"
" \"btcpaddress\" (string) a BTCP address associated with the given account\n"
" ,...\n"
"]\n"
"\nExamples:\n"
@ -403,33 +403,33 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() < 2 || params.size() > 5)
throw runtime_error(
"sendtoaddress \"zcashaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
"sendtoaddress \"btcpaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
+ HelpRequiringPassphrase() +
"\nArguments:\n"
"1. \"zcashaddress\" (string, required) The zcash address to send to.\n"
"2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n"
"1. \"btcpaddress\" (string, required) The BTCP address to send to.\n"
"2. \"amount\" (numeric, required) The amount in BTCP to send. eg 0.1\n"
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
" This is not part of the transaction, just kept in your wallet.\n"
"4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n"
" to which you're sending the transaction. This is not part of the \n"
" transaction, just kept in your wallet.\n"
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
" The recipient will receive less zcash than you enter in the amount field.\n"
" The recipient will receive less BTCP than you enter in the amount field.\n"
"\nResult:\n"
"\"transactionid\" (string) The transaction id.\n"
"\nExamples:\n"
+ HelpExampleCli("sendtoaddress", "\"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1")
+ HelpExampleCli("sendtoaddress", "\"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"donation\" \"seans outpost\"")
+ HelpExampleCli("sendtoaddress", "\"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"\" \"\" true")
+ HelpExampleRpc("sendtoaddress", "\"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.1, \"donation\", \"seans outpost\"")
+ HelpExampleCli("sendtoaddress", "\"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1")
+ HelpExampleCli("sendtoaddress", "\"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"donation\" \"seans outpost\"")
+ HelpExampleCli("sendtoaddress", "\"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"\" \"\" true")
+ HelpExampleRpc("sendtoaddress", "\"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.1, \"donation\", \"seans outpost\"")
);
LOCK2(cs_main, pwalletMain->cs_wallet);
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BTCP address");
// Amount
CAmount nAmount = AmountFromValue(params[1]);
@ -469,8 +469,8 @@ UniValue listaddressgroupings(const UniValue& params, bool fHelp)
"[\n"
" [\n"
" [\n"
" \"zcashaddress\", (string) The zcash address\n"
" amount, (numeric) The amount in btc\n"
" \"btcpaddress\", (string) The BTCP address\n"
" amount, (numeric) The amount in BTCP\n"
" \"account\" (string, optional) The account (DEPRECATED)\n"
" ]\n"
" ,...\n"
@ -512,11 +512,11 @@ UniValue signmessage(const UniValue& params, bool fHelp)
if (fHelp || params.size() != 2)
throw runtime_error(
"signmessage \"zcashaddress\" \"message\"\n"
"signmessage \"btcpaddress\" \"message\"\n"
"\nSign a message with the private key of an address"
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"zcashaddress\" (string, required) The zcash address to use for the private key.\n"
"1. \"btcpaddress\" (string, required) The BTCP address to use for the private key.\n"
"2. \"message\" (string, required) The message to create a signature of.\n"
"\nResult:\n"
"\"signature\" (string) The signature of the message encoded in base 64\n"
@ -524,11 +524,11 @@ UniValue signmessage(const UniValue& params, bool fHelp)
"\nUnlock the wallet for 30 seconds\n"
+ HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") +
"\nCreate the signature\n"
+ HelpExampleCli("signmessage", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"my message\"") +
+ HelpExampleCli("signmessage", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"my message\"") +
"\nVerify the signature\n"
+ HelpExampleCli("verifymessage", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"signature\" \"my message\"") +
+ HelpExampleCli("verifymessage", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" \"signature\" \"my message\"") +
"\nAs json rpc\n"
+ HelpExampleRpc("signmessage", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", \"my message\"")
+ HelpExampleRpc("signmessage", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", \"my message\"")
);
LOCK2(cs_main, pwalletMain->cs_wallet);
@ -568,22 +568,22 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"getreceivedbyaddress \"zcashaddress\" ( minconf )\n"
"\nReturns the total amount received by the given zcashaddress in transactions with at least minconf confirmations.\n"
"getreceivedbyaddress \"btcpaddress\" ( minconf )\n"
"\nReturns the total amount received by the given btcpaddress in transactions with at least minconf confirmations.\n"
"\nArguments:\n"
"1. \"zcashaddress\" (string, required) The zcash address for transactions.\n"
"1. \"btcpaddress\" (string, required) The BTCP address for transactions.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"\nResult:\n"
"amount (numeric) The total amount in btc received at this address.\n"
"amount (numeric) The total amount in BTCP received at this address.\n"
"\nExamples:\n"
"\nThe amount from transactions with at least 1 confirmation\n"
+ HelpExampleCli("getreceivedbyaddress", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"") +
+ HelpExampleCli("getreceivedbyaddress", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"") +
"\nThe amount including unconfirmed transactions, zero confirmations\n"
+ HelpExampleCli("getreceivedbyaddress", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" 0") +
+ HelpExampleCli("getreceivedbyaddress", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" 0") +
"\nThe amount with at least 6 confirmation, very safe\n"
+ HelpExampleCli("getreceivedbyaddress", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" 6") +
+ HelpExampleCli("getreceivedbyaddress", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\" 6") +
"\nAs a json rpc call\n"
+ HelpExampleRpc("getreceivedbyaddress", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", 6")
+ HelpExampleRpc("getreceivedbyaddress", "\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\", 6")
);
LOCK2(cs_main, pwalletMain->cs_wallet);
@ -591,7 +591,7 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
// Bitcoin address
CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BTCP address");
CScript scriptPubKey = GetScriptForDestination(address.Get());
if (!IsMine(*pwalletMain,scriptPubKey))
return (double)0.0;
@ -632,7 +632,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp)
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"\nResult:\n"
"amount (numeric) The total amount in btc received for this account.\n"
"amount (numeric) The total amount in BTCP received for this account.\n"
"\nExamples:\n"
"\nAmount received by the default account with at least 1 confirmation\n"
+ HelpExampleCli("getreceivedbyaccount", "\"\"") +
@ -722,7 +722,7 @@ UniValue getbalance(const UniValue& params, bool fHelp)
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
"\nResult:\n"
"amount (numeric) The total amount in btc received for this account.\n"
"amount (numeric) The total amount in BTCP received for this account.\n"
"\nExamples:\n"
"\nThe total amount in the wallet\n"
+ HelpExampleCli("getbalance", "") +
@ -875,14 +875,14 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
if (fHelp || params.size() < 3 || params.size() > 6)
throw runtime_error(
"sendfrom \"fromaccount\" \"tozcashaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a zcash address.\n"
"sendfrom \"fromaccount\" \"tobtcpaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a BTCP address.\n"
"The amount is a real and is rounded to the nearest 0.00000001."
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"2. \"tozcashaddress\" (string, required) The zcash address to send funds to.\n"
"3. amount (numeric, required) The amount in btc. (transaction fee is added on top).\n"
"2. \"tobtcpaddress\" (string, required) The BTCP address to send funds to.\n"
"3. amount (numeric, required) The amount in BTCP. (transaction fee is added on top).\n"
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
" This is not part of the transaction, just kept in your wallet.\n"
@ -892,12 +892,12 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
"\nResult:\n"
"\"transactionid\" (string) The transaction id.\n"
"\nExamples:\n"
"\nSend 0.01 btc from the default account to the address, must have at least 1 confirmation\n"
+ HelpExampleCli("sendfrom", "\"\" \"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") +
"\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
+ HelpExampleCli("sendfrom", "\"tabby\" \"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"") +
"\nSend 0.01 BTCP from the default account to the address, must have at least 1 confirmation\n"
+ HelpExampleCli("sendfrom", "\"\" \"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") +
"\nSend 0.01 BTCP from the tabby account to the given address, funds must have at least 6 confirmations\n"
+ HelpExampleCli("sendfrom", "\"tabby\" \"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"") +
"\nAs a json rpc call\n"
+ HelpExampleRpc("sendfrom", "\"tabby\", \"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.01, 6, \"donation\", \"seans outpost\"")
+ HelpExampleRpc("sendfrom", "\"tabby\", \"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.01, 6, \"donation\", \"seans outpost\"")
);
LOCK2(cs_main, pwalletMain->cs_wallet);
@ -905,7 +905,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
string strAccount = AccountFromValue(params[0]);
CBitcoinAddress address(params[1].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BTCP address");
CAmount nAmount = AmountFromValue(params[2]);
if (nAmount <= 0)
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount for send");
@ -947,14 +947,14 @@ UniValue sendmany(const UniValue& params, bool fHelp)
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
" {\n"
" \"address\":amount (numeric) The zcash address is the key, the numeric amount in btc is the value\n"
" \"address\":amount (numeric) The BTCP address is the key, the numeric amount in BTCP is the value\n"
" ,...\n"
" }\n"
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
"4. \"comment\" (string, optional) A comment\n"
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
" The fee will be equally deducted from the amount of each selected address.\n"
" Those recipients will receive less zcashs than you enter in their corresponding amount field.\n"
" Those recipients will receive less BTCP than you enter in their corresponding amount field.\n"
" If no addresses are specified here, the sender pays the fee.\n"
" [\n"
" \"address\" (string) Subtract fee from this address\n"
@ -965,13 +965,13 @@ UniValue sendmany(const UniValue& params, bool fHelp)
" the number of addresses.\n"
"\nExamples:\n"
"\nSend two amounts to two different addresses:\n"
+ HelpExampleCli("sendmany", "\"\" \"{\\\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"t1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") +
+ HelpExampleCli("sendmany", "\"\" \"{\\\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"b1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") +
"\nSend two amounts to two different addresses setting the confirmation and comment:\n"
+ HelpExampleCli("sendmany", "\"\" \"{\\\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"t1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") +
+ HelpExampleCli("sendmany", "\"\" \"{\\\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"b1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") +
"\nSend two amounts to two different addresses, subtract fee from amount:\n"
+ HelpExampleCli("sendmany", "\"\" \"{\\\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"t1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\",\\\"t1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"") +
+ HelpExampleCli("sendmany", "\"\" \"{\\\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"b1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\",\\\"b1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"") +
"\nAs a json rpc call\n"
+ HelpExampleRpc("sendmany", "\"\", \"{\\\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"t1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"")
+ HelpExampleRpc("sendmany", "\"\", \"{\\\"b14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\\\":0.01,\\\"b1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"")
);
LOCK2(cs_main, pwalletMain->cs_wallet);
@ -1000,7 +1000,7 @@ UniValue sendmany(const UniValue& params, bool fHelp)
{
CBitcoinAddress address(name_);
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Zcash address: ")+name_);
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid BTCP address: ")+name_);
if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+name_);
@ -1056,26 +1056,26 @@ UniValue addmultisigaddress(const UniValue& params, bool fHelp)
{
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
"Each key is a Zcash address or hex-encoded public key.\n"
"Each key is a BTCP address or hex-encoded public key.\n"
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
"\nArguments:\n"
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
"2. \"keysobject\" (string, required) A json array of zcash addresses or hex-encoded public keys\n"
"2. \"keysobject\" (string, required) A json array of BTCP addresses or hex-encoded public keys\n"
" [\n"
" \"address\" (string) zcash address or hex-encoded public key\n"
" \"address\" (string) BTCP address or hex-encoded public key\n"
" ...,\n"
" ]\n"
"3. \"account\" (string, optional) DEPRECATED. If provided, MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"\nResult:\n"
"\"zcashaddress\" (string) A zcash address associated with the keys.\n"
"\"btcpaddress\" (string) A BTCP address associated with the keys.\n"
"\nExamples:\n"
"\nAdd a multisig address from 2 addresses\n"
+ HelpExampleCli("addmultisigaddress", "2 \"[\\\"t16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"t171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") +
+ HelpExampleCli("addmultisigaddress", "2 \"[\\\"b16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"b171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") +
"\nAs json rpc call\n"
+ HelpExampleRpc("addmultisigaddress", "2, \"[\\\"t16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"t171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"")
+ HelpExampleRpc("addmultisigaddress", "2, \"[\\\"b16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"b171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"")
;
throw runtime_error(msg);
}
@ -1248,7 +1248,7 @@ UniValue listreceivedbyaddress(const UniValue& params, bool fHelp)
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
" \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n"
" \"amount\" : x.xxx, (numeric) The total amount in btc received by the address\n"
" \"amount\" : x.xxx, (numeric) The total amount in BTCP received by the address\n"
" \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n"
" }\n"
" ,...\n"
@ -1416,17 +1416,17 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
" {\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
" It will be \"\" for the default account.\n"
" \"address\":\"zcashaddress\", (string) The zcash address of the transaction. Not present for \n"
" \"address\":\"btcpaddress\", (string) The BTCP address of the transaction. Not present for \n"
" move transactions (category = move).\n"
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
" transaction between accounts, and not associated with an address,\n"
" transaction id or block. 'send' and 'receive' transactions are \n"
" associated with an address, transaction id and block details\n"
" \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the\n"
" \"amount\": x.xxx, (numeric) The amount in BTCP. This is negative for the 'send' category, and for the\n"
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
" and for the 'move' category for inbound funds.\n"
" \"vout\" : n, (numeric) the vout value\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in btc. This is negative and only available for the \n"
" \"fee\": x.xxx, (numeric) The amount of the fee in BTCP. This is negative and only available for the \n"
" 'send' category of transactions.\n"
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
" 'receive' category of transactions.\n"
@ -1616,12 +1616,12 @@ UniValue listsinceblock(const UniValue& params, bool fHelp)
"{\n"
" \"transactions\": [\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
" \"address\":\"zcashaddress\", (string) The zcash address of the transaction. Not present for move transactions (category = move).\n"
" \"address\":\"btcpaddress\", (string) The BTCP address of the transaction. Not present for move transactions (category = move).\n"
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
" \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves \n"
" \"amount\": x.xxx, (numeric) The amount in BTCP. This is negative for the 'send' category, and for the 'move' category for moves \n"
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
" \"vout\" : n, (numeric) the vout value\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in btc. This is negative and only available for the 'send' category of transactions.\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in BTCP. This is negative and only available for the 'send' category of transactions.\n"
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
" \"blockindex\": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
@ -1704,7 +1704,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
"2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
"\nResult:\n"
"{\n"
" \"amount\" : x.xxx, (numeric) The transaction amount in btc\n"
" \"amount\" : x.xxx, (numeric) The transaction amount in BTCP\n"
" \"confirmations\" : n, (numeric) The number of confirmations\n"
" \"blockhash\" : \"hash\", (string) The block hash\n"
" \"blockindex\" : xx, (numeric) The block index\n"
@ -1715,9 +1715,9 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
" \"details\" : [\n"
" {\n"
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
" \"address\" : \"zcashaddress\", (string) The zcash address involved in the transaction\n"
" \"address\" : \"btcpaddress\", (string) The BTCP address involved in the transaction\n"
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
" \"amount\" : x.xxx (numeric) The amount in btc\n"
" \"amount\" : x.xxx (numeric) The amount in BTCP\n"
" \"vout\" : n, (numeric) the vout value\n"
" }\n"
" ,...\n"
@ -1875,7 +1875,7 @@ UniValue walletpassphrase(const UniValue& params, bool fHelp)
throw runtime_error(
"walletpassphrase \"passphrase\" timeout\n"
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
"This is needed prior to performing transactions related to private keys such as sending zcash\n"
"This is needed prior to performing transactions related to private keys such as sending BTCP\n"
"\nArguments:\n"
"1. \"passphrase\" (string, required) The wallet passphrase\n"
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
@ -1989,7 +1989,7 @@ UniValue walletlock(const UniValue& params, bool fHelp)
"\nSet the passphrase for 2 minutes to perform a transaction\n"
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\" 120") +
"\nPerform a send (requires passphrase set)\n"
+ HelpExampleCli("sendtoaddress", "\"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 1.0") +
+ HelpExampleCli("sendtoaddress", "\"b1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 1.0") +
"\nClear the passphrase since we are done before 2 minutes is up\n"
+ HelpExampleCli("walletlock", "") +
"\nAs json rpc call\n"
@ -2040,10 +2040,10 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
"\nExamples:\n"
"\nEncrypt you wallet\n"
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
"\nNow set the passphrase to use the wallet, such as for signing or sending zcash\n"
"\nNow set the passphrase to use the wallet, such as for signing or sending BTCP\n"
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
"\nNow we can so something like sign\n"
+ HelpExampleCli("signmessage", "\"zcashaddress\" \"test message\"") +
+ HelpExampleCli("signmessage", "\"btcpaddress\" \"test message\"") +
"\nNow lock the wallet again by removing the passphrase\n"
+ HelpExampleCli("walletlock", "") +
"\nAs a json rpc call\n"
@ -2078,7 +2078,7 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
StartShutdown();
return "wallet encrypted; Zcash server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
return "wallet encrypted; BTCP server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
}
UniValue lockunspent(const UniValue& params, bool fHelp)
@ -2091,7 +2091,7 @@ UniValue lockunspent(const UniValue& params, bool fHelp)
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
"\nUpdates list of temporarily unspendable outputs.\n"
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
"A locked transaction output will not be chosen by automatic coin selection, when spending zcash.\n"
"A locked transaction output will not be chosen by automatic coin selection, when spending BTCP.\n"
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
"Also see the listunspent call\n"
@ -2253,14 +2253,14 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
"\nResult:\n"
"{\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
" \"balance\": xxxxxxx, (numeric) the total confirmed zcash balance of the wallet\n"
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed zcash balance of the wallet\n"
" \"balance\": xxxxxxx, (numeric) the total confirmed BTCP balance of the wallet\n"
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed BTCP balance of the wallet\n"
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet\n"
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
" \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in ZEC/KB\n"
" \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in BTCP/kB\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getwalletinfo", "")
@ -2324,9 +2324,9 @@ UniValue listunspent(const UniValue& params, bool fHelp)
"\nArguments:\n"
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
"3. \"addresses\" (string) A json array of zcash addresses to filter\n"
"3. \"addresses\" (string) A json array of BTCP addresses to filter\n"
" [\n"
" \"address\" (string) zcash address\n"
" \"address\" (string) BTCP address\n"
" ,...\n"
" ]\n"
"\nResult\n"
@ -2334,10 +2334,10 @@ UniValue listunspent(const UniValue& params, bool fHelp)
" {\n"
" \"txid\" : \"txid\", (string) the transaction id \n"
" \"vout\" : n, (numeric) the vout value\n"
" \"address\" : \"address\", (string) the zcash address\n"
" \"address\" : \"address\", (string) the BTCP address\n"
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
" \"scriptPubKey\" : \"key\", (string) the script key\n"
" \"amount\" : x.xxx, (numeric) the transaction amount in btc\n"
" \"amount\" : x.xxx, (numeric) the transaction amount in BTCP\n"
" \"confirmations\" : n (numeric) The number of confirmations\n"
" }\n"
" ,...\n"
@ -2345,8 +2345,8 @@ UniValue listunspent(const UniValue& params, bool fHelp)
"\nExamples\n"
+ HelpExampleCli("listunspent", "")
+ HelpExampleCli("listunspent", "6 9999999 \"[\\\"t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"")
+ HelpExampleRpc("listunspent", "6, 9999999 \"[\\\"t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"")
+ HelpExampleCli("listunspent", "6 9999999 \"[\\\"b1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"b1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"")
+ HelpExampleRpc("listunspent", "6, 9999999 \"[\\\"b1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"b1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"")
);
RPCTypeCheck(params, boost::assign::list_of(UniValue::VNUM)(UniValue::VNUM)(UniValue::VARR));
@ -2366,7 +2366,7 @@ UniValue listunspent(const UniValue& params, bool fHelp)
const UniValue& input = inputs[idx];
CBitcoinAddress address(input.get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Zcash address: ")+input.get_str());
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid BTCP address: ")+input.get_str());
if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str());
setAddress.insert(address);
@ -2923,10 +2923,10 @@ UniValue z_getnewaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 0)
throw runtime_error(
"z_getnewaddress\n"
"\nReturns a new zaddr for receiving payments.\n"
"\nReturns a new z-address for receiving payments.\n"
"\nArguments:\n"
"\nResult:\n"
"\"zcashaddress\" (string) The new zaddr\n"
"\"btcpaddress\" (string) The new z-address\n"
"\nExamples:\n"
+ HelpExampleCli("z_getnewaddress", "")
+ HelpExampleRpc("z_getnewaddress", "")
@ -2950,11 +2950,11 @@ UniValue z_listaddresses(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"z_listaddresses\n"
"\nReturns the list of zaddr belonging to the wallet.\n"
"\nReturns the list of z-addresses belonging to the wallet.\n"
"\nArguments:\n"
"\nResult:\n"
"[ (json array of string)\n"
" \"zaddr\" (string) a zaddr belonging to the wallet\n"
" \"zaddr\" (string) a z-address belonging to the wallet\n"
" ,...\n"
"]\n"
"\nExamples:\n"
@ -2981,7 +2981,7 @@ CAmount getBalanceTaddr(std::string transparentAddress, int minDepth=1) {
if (transparentAddress.length() > 0) {
CBitcoinAddress taddr = CBitcoinAddress(transparentAddress);
if (!taddr.IsValid()) {
throw std::runtime_error("invalid transparent address");
throw std::runtime_error("Invalid transparent address");
}
setAddress.insert(taddr);
}
@ -3032,7 +3032,7 @@ UniValue z_listreceivedbyaddress(const UniValue& params, bool fHelp)
if (fHelp || params.size()==0 || params.size() >2)
throw runtime_error(
"z_listreceivedbyaddress \"address\" ( minconf )\n"
"\nReturn a list of amounts received by a zaddr belonging to the nodes wallet.\n"
"\nReturn a list of amounts received by a z-addresses belonging to the nodes wallet.\n"
"\nArguments:\n"
"1. \"address\" (string) The private address.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
@ -3062,11 +3062,11 @@ UniValue z_listreceivedbyaddress(const UniValue& params, bool fHelp)
try {
zaddr = address.Get();
} catch (const std::runtime_error&) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid zaddr.");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid z-address (zaddr).");
}
if (!pwalletMain->HaveSpendingKey(zaddr)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "From address does not belong to this node, zaddr spending key not found.");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "\"From\" address does not belong to this node; zaddr spending key not found.");
}
@ -3093,12 +3093,12 @@ UniValue z_getbalance(const UniValue& params, bool fHelp)
if (fHelp || params.size()==0 || params.size() >2)
throw runtime_error(
"z_getbalance \"address\" ( minconf )\n"
"\nReturns the balance of a taddr or zaddr belonging to the nodes wallet.\n"
"\nReturns the balance of a t-address or z-address belonging to the node's wallet.\n"
"\nArguments:\n"
"1. \"address\" (string) The selected address. It may be a transparent or private address.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"\nResult:\n"
"amount (numeric) The total amount in ZEC received for this address.\n"
"amount (numeric) The total amount in BTCP received for this address.\n"
"\nExamples:\n"
"\nThe total amount received by address \"myaddress\"\n"
+ HelpExampleCli("z_getbalance", "\"myaddress\"") +
@ -3129,10 +3129,10 @@ UniValue z_getbalance(const UniValue& params, bool fHelp)
try {
zaddr = address.Get();
} catch (const std::runtime_error&) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid from address, should be a taddr or zaddr.");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid \"from\" address, should be a t-address or z-address.");
}
if (!pwalletMain->HaveSpendingKey(zaddr)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "From address does not belong to this node, zaddr spending key not found.");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "\"From\" address does not belong to this node, zaddr spending key not found.");
}
}
@ -3208,7 +3208,7 @@ UniValue z_getoperationresult(const UniValue& params, bool fHelp)
"\nRetrieve the result and status of an operation which has finished, and then remove the operation from memory."
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"operationid\" (array, optional) A list of operation ids we are interested in. If not provided, examine all operations known to the node.\n"
"1. \"operationid\" (array, optional) A list of operation ids we are interested in. If not provided, examine all operations known to the node.\n"
"\nResult:\n"
"\" [object, ...]\" (array) A list of JSON objects\n"
);
@ -3225,10 +3225,10 @@ UniValue z_getoperationstatus(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"z_getoperationstatus ([\"operationid\", ... ]) \n"
"\nGet operation status and any associated result or error data. The operation will remain in memory."
"\nGet operation status and any associated result or error data. The operation will remain in memory."
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"operationid\" (array, optional) A list of operation ids we are interested in. If not provided, examine all operations known to the node.\n"
"1. \"operationid\" (array, optional) A list of operation ids we are interested in. If not provided, examine all operations known to the node.\n"
"\nResult:\n"
"\" [object, ...]\" (array) A list of JSON objects\n"
);
@ -3314,17 +3314,17 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
throw runtime_error(
"z_sendmany \"fromaddress\" [{\"address\":... ,\"amount\":...},...] ( minconf ) ( fee )\n"
"\nSend multiple times. Amounts are double-precision floating point numbers."
"\nChange from a taddr flows to a new taddr address, while change from zaddr returns to itself."
"\nWhen sending coinbase UTXOs to a zaddr, change is not allowed. The entire value of the UTXO(s) must be consumed."
+ strprintf("\nCurrently, the maximum number of zaddr outputs is %d due to transaction size limits.\n", Z_SENDMANY_MAX_ZADDR_OUTPUTS)
"\nChange from a t-address flows to a new t-address, while change from a z-address returns to itself."
"\nWhen sending coinbase UTXOs to a z-address, change is not allowed. The entire value of the UTXO(s) must be consumed."
+ strprintf("\nCurrently, the maximum number of z-address outputs is %d due to transaction size limits.\n", Z_SENDMANY_MAX_ZADDR_OUTPUTS)
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"fromaddress\" (string, required) The taddr or zaddr to send the funds from.\n"
"1. \"fromaddress\" (string, required) The t-address or z-address to send the funds from.\n"
"2. \"amounts\" (array, required) An array of json objects representing the amounts to send.\n"
" [{\n"
" \"address\":address (string, required) The address is a taddr or zaddr\n"
" \"amount\":amount (numeric, required) The numeric amount in ZEC is the value\n"
" \"memo\":memo (string, optional) If the address is a zaddr, raw data represented in hexadecimal string format\n"
" \"address\":address (string, required) The address is a t-address or z-address\n"
" \"amount\":amount (numeric, required) The numeric amount in BTCP is the value\n"
" \"memo\":memo (string, optional) If the address is a z-address, raw data represented in hexadecimal string format\n"
" }, ... ]\n"
"3. minconf (numeric, optional, default=1) Only use funds confirmed at least this many times.\n"
"4. fee (numeric, optional, default="
@ -3347,14 +3347,14 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
zaddr = address.Get();
} catch (const std::runtime_error&) {
// invalid
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid from address, should be a taddr or zaddr.");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid \"from\" address, should be a t-address or z-address.");
}
}
// Check that we have the spending key
if (!fromTaddr) {
if (!pwalletMain->HaveSpendingKey(zaddr)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "From address does not belong to this node, zaddr spending key not found.");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "\"From\" address does not belong to this node, z-address spending key not found.");
}
}
@ -3404,7 +3404,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
if (!memoValue.isNull()) {
memo = memoValue.get_str();
if (!isZaddr) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Memo can not be used with a taddr. It can only be used with a zaddr.");
throw JSONRPCError(RPC_INVALID_PARAMETER, "Memo can not be used with a t-address. It can only be used with a z-address.");
} else if (!IsHex(memo)) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected memo data in hexadecimal format.");
}
@ -3429,7 +3429,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
// Check the number of zaddr outputs does not exceed the limit.
if (zaddrRecipients.size() > Z_SENDMANY_MAX_ZADDR_OUTPUTS) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, too many zaddr outputs");
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, too many z-address outputs");
}
// As a sanity check, estimate and verify that the size of the transaction will be valid.