Auto merge of #2564 - str4d:2074-currency-units, r=str4d
Rationalize currency unit to "ZEC" Cherry-picked from the upstream PR bitcoin/bitcoin#6504 Part of #2074
This commit is contained in:
commit
e0bef1de56
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
#include "tinyformat.h"
|
#include "tinyformat.h"
|
||||||
|
|
||||||
|
const std::string CURRENCY_UNIT = "ZEC";
|
||||||
|
|
||||||
CFeeRate::CFeeRate(const CAmount& nFeePaid, size_t nSize)
|
CFeeRate::CFeeRate(const CAmount& nFeePaid, size_t nSize)
|
||||||
{
|
{
|
||||||
if (nSize > 0)
|
if (nSize > 0)
|
||||||
|
@ -27,5 +29,5 @@ CAmount CFeeRate::GetFee(size_t nSize) const
|
||||||
|
|
||||||
std::string CFeeRate::ToString() const
|
std::string CFeeRate::ToString() const
|
||||||
{
|
{
|
||||||
return strprintf("%d.%08d BTC/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
|
return strprintf("%d.%08d %s/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN, CURRENCY_UNIT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@ typedef int64_t CAmount;
|
||||||
static const CAmount COIN = 100000000;
|
static const CAmount COIN = 100000000;
|
||||||
static const CAmount CENT = 1000000;
|
static const CAmount CENT = 1000000;
|
||||||
|
|
||||||
|
extern const std::string CURRENCY_UNIT;
|
||||||
|
|
||||||
/** No amount larger than this (in satoshi) is valid.
|
/** No amount larger than this (in satoshi) is valid.
|
||||||
*
|
*
|
||||||
* Note that this constant is *not* the total money supply, which in Bitcoin
|
* Note that this constant is *not* the total money supply, which in Bitcoin
|
||||||
|
|
16
src/init.cpp
16
src/init.cpp
|
@ -402,16 +402,17 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||||
strUsage += HelpMessageOpt("-disablewallet", _("Do not load the wallet and disable wallet RPC calls"));
|
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));
|
strUsage += HelpMessageOpt("-keypool=<n>", strprintf(_("Set key pool size to <n> (default: %u)"), 100));
|
||||||
if (showDebug)
|
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 %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)",
|
||||||
FormatMoney(CWallet::minTxFee.GetFeePerK())));
|
CURRENCY_UNIT, 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 %s/kB) to add to transactions you send (default: %s)"),
|
||||||
strUsage += HelpMessageOpt("-rescan", _("Rescan the blockchain for missing wallet transactions") + " " + _("on startup"));
|
CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK())));
|
||||||
|
strUsage += HelpMessageOpt("-rescan", _("Rescan the block chain for missing wallet transactions") + " " + _("on startup"));
|
||||||
strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("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));
|
strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0));
|
||||||
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1));
|
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1));
|
||||||
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET));
|
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET));
|
||||||
strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)"),
|
strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees (in %s) to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)"),
|
||||||
FormatMoney(maxTxFee)));
|
CURRENCY_UNIT, FormatMoney(maxTxFee)));
|
||||||
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup"));
|
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup"));
|
||||||
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat"));
|
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat"));
|
||||||
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), true));
|
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), true));
|
||||||
|
@ -462,7 +463,8 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||||
strUsage += HelpMessageOpt("-relaypriority", strprintf("Require high priority for relaying free or low-fee transactions (default: %u)", 0));
|
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("-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 %s/kB) smaller than this are considered zero fee for relaying (default: %s)"),
|
||||||
|
CURRENCY_UNIT, FormatMoney(::minRelayTxFee.GetFeePerK())));
|
||||||
strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
|
strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
|
||||||
if (showDebug)
|
if (showDebug)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
#include "amount.h"
|
||||||
|
#include "chain.h"
|
||||||
|
#include "chainparams.h"
|
||||||
#include "checkpoints.h"
|
#include "checkpoints.h"
|
||||||
#include "consensus/validation.h"
|
#include "consensus/validation.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
@ -260,7 +263,7 @@ UniValue getrawmempool(const UniValue& params, bool fHelp)
|
||||||
"{ (json object)\n"
|
"{ (json object)\n"
|
||||||
" \"transactionid\" : { (json object)\n"
|
" \"transactionid\" : { (json object)\n"
|
||||||
" \"size\" : n, (numeric) transaction size in bytes\n"
|
" \"size\" : n, (numeric) transaction size in bytes\n"
|
||||||
" \"fee\" : n, (numeric) transaction fee in bitcoins\n"
|
" \"fee\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + "\n"
|
||||||
" \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n"
|
" \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n"
|
||||||
" \"height\" : n, (numeric) block height when transaction entered pool\n"
|
" \"height\" : n, (numeric) block height when transaction entered pool\n"
|
||||||
" \"startingpriority\" : n, (numeric) priority when transaction entered pool\n"
|
" \"startingpriority\" : n, (numeric) priority when transaction entered pool\n"
|
||||||
|
@ -510,7 +513,7 @@ UniValue gettxout(const UniValue& params, bool fHelp)
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"bestblock\" : \"hash\", (string) the block hash\n"
|
" \"bestblock\" : \"hash\", (string) the block hash\n"
|
||||||
" \"confirmations\" : n, (numeric) The number of confirmations\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 " + CURRENCY_UNIT + "\n"
|
||||||
" \"scriptPubKey\" : { (json object)\n"
|
" \"scriptPubKey\" : { (json object)\n"
|
||||||
" \"asm\" : \"code\", (string) \n"
|
" \"asm\" : \"code\", (string) \n"
|
||||||
" \"hex\" : \"hex\", (string) \n"
|
" \"hex\" : \"hex\", (string) \n"
|
||||||
|
|
|
@ -883,8 +883,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"
|
"1. height (numeric, optional) The block height. If not provided, defaults to the current height of the chain.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"miner\" : x.xxx (numeric) The mining reward amount in ZEC.\n"
|
" \"miner\" : x.xxx (numeric) The mining reward amount in " + CURRENCY_UNIT + ".\n"
|
||||||
" \"founders\" : x.xxx (numeric) The founders reward amount in ZEC.\n"
|
" \"founders\" : x.xxx (numeric) The founders reward amount in " + CURRENCY_UNIT + ".\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("getblocksubsidy", "1000")
|
+ HelpExampleCli("getblocksubsidy", "1000")
|
||||||
|
|
|
@ -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"
|
" \"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"
|
" \"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"
|
" \"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"
|
" \"paytxfee\": x.xxxx, (numeric) the transaction fee set in " + CURRENCY_UNIT + "/kB\n"
|
||||||
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
|
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in " + CURRENCY_UNIT + "/kB\n"
|
||||||
" \"errors\": \"...\" (string) any error messages\n"
|
" \"errors\": \"...\" (string) any error messages\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
|
|
|
@ -421,7 +421,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\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 " + CURRENCY_UNIT + "/kB\n"
|
||||||
" \"localaddresses\": [ (array) list of local addresses\n"
|
" \"localaddresses\": [ (array) list of local addresses\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"address\": \"xxxx\", (string) network address\n"
|
" \"address\": \"xxxx\", (string) network address\n"
|
||||||
|
|
|
@ -204,7 +204,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
|
||||||
" ],\n"
|
" ],\n"
|
||||||
" \"vout\" : [ (array of json objects)\n"
|
" \"vout\" : [ (array of json objects)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"value\" : x.xxx, (numeric) The value in btc\n"
|
" \"value\" : x.xxx, (numeric) The value in " + CURRENCY_UNIT + "\n"
|
||||||
" \"n\" : n, (numeric) index\n"
|
" \"n\" : n, (numeric) index\n"
|
||||||
" \"scriptPubKey\" : { (json object)\n"
|
" \"scriptPubKey\" : { (json object)\n"
|
||||||
" \"asm\" : \"asm\", (string) the asm\n"
|
" \"asm\" : \"asm\", (string) the asm\n"
|
||||||
|
@ -221,8 +221,8 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
|
||||||
" ],\n"
|
" ],\n"
|
||||||
" \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n"
|
" \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n"
|
" \"vpub_old\" : x.xxx, (numeric) public input value in " + CURRENCY_UNIT + "\n"
|
||||||
" \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n"
|
" \"vpub_new\" : x.xxx, (numeric) public output value in " + CURRENCY_UNIT + "\n"
|
||||||
" \"anchor\" : \"hex\", (string) the anchor\n"
|
" \"anchor\" : \"hex\", (string) the anchor\n"
|
||||||
" \"nullifiers\" : [ (json array of string)\n"
|
" \"nullifiers\" : [ (json array of string)\n"
|
||||||
" \"hex\" (string) input note nullifier\n"
|
" \"hex\" (string) input note nullifier\n"
|
||||||
|
@ -417,7 +417,7 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp)
|
||||||
" ]\n"
|
" ]\n"
|
||||||
"2. \"addresses\" (string, required) a json object with addresses as keys and amounts as values\n"
|
"2. \"addresses\" (string, required) a json object with addresses as keys and amounts as values\n"
|
||||||
" {\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 " + CURRENCY_UNIT + " amount\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
|
||||||
" ],\n"
|
" ],\n"
|
||||||
" \"vout\" : [ (array of json objects)\n"
|
" \"vout\" : [ (array of json objects)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"value\" : x.xxx, (numeric) The value in btc\n"
|
" \"value\" : x.xxx, (numeric) The value in " + CURRENCY_UNIT + "\n"
|
||||||
" \"n\" : n, (numeric) index\n"
|
" \"n\" : n, (numeric) index\n"
|
||||||
" \"scriptPubKey\" : { (json object)\n"
|
" \"scriptPubKey\" : { (json object)\n"
|
||||||
" \"asm\" : \"asm\", (string) the asm\n"
|
" \"asm\" : \"asm\", (string) the asm\n"
|
||||||
|
@ -521,8 +521,8 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp)
|
||||||
" ],\n"
|
" ],\n"
|
||||||
" \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n"
|
" \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n"
|
" \"vpub_old\" : x.xxx, (numeric) public input value in " + CURRENCY_UNIT + "\n"
|
||||||
" \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n"
|
" \"vpub_new\" : x.xxx, (numeric) public output value in " + CURRENCY_UNIT + "\n"
|
||||||
" \"anchor\" : \"hex\", (string) the anchor\n"
|
" \"anchor\" : \"hex\", (string) the anchor\n"
|
||||||
" \"nullifiers\" : [ (json array of string)\n"
|
" \"nullifiers\" : [ (json array of string)\n"
|
||||||
" \"hex\" (string) input note nullifier\n"
|
" \"hex\" (string) input note nullifier\n"
|
||||||
|
|
|
@ -408,7 +408,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp)
|
||||||
+ HelpRequiringPassphrase() +
|
+ HelpRequiringPassphrase() +
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. \"zcashaddress\" (string, required) The zcash address to send to.\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"
|
"2. \"amount\" (numeric, required) The amount in " + CURRENCY_UNIT + " to send. eg 0.1\n"
|
||||||
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \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"
|
" 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"
|
"4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n"
|
||||||
|
@ -470,7 +470,7 @@ UniValue listaddressgroupings(const UniValue& params, bool fHelp)
|
||||||
" [\n"
|
" [\n"
|
||||||
" [\n"
|
" [\n"
|
||||||
" \"zcashaddress\", (string) The zcash address\n"
|
" \"zcashaddress\", (string) The zcash address\n"
|
||||||
" amount, (numeric) The amount in btc\n"
|
" amount, (numeric) The amount in " + CURRENCY_UNIT + "\n"
|
||||||
" \"account\" (string, optional) The account (DEPRECATED)\n"
|
" \"account\" (string, optional) The account (DEPRECATED)\n"
|
||||||
" ]\n"
|
" ]\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
|
@ -574,7 +574,7 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
|
||||||
"1. \"zcashaddress\" (string, required) The zcash address for transactions.\n"
|
"1. \"zcashaddress\" (string, required) The zcash address for transactions.\n"
|
||||||
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"amount (numeric) The total amount in btc received at this address.\n"
|
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received at this address.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nThe amount from transactions with at least 1 confirmation\n"
|
"\nThe amount from transactions with at least 1 confirmation\n"
|
||||||
+ HelpExampleCli("getreceivedbyaddress", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"") +
|
+ HelpExampleCli("getreceivedbyaddress", "\"t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1\"") +
|
||||||
|
@ -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"
|
"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"
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"amount (numeric) The total amount in btc received for this account.\n"
|
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received for this account.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nAmount received by the default account with at least 1 confirmation\n"
|
"\nAmount received by the default account with at least 1 confirmation\n"
|
||||||
+ HelpExampleCli("getreceivedbyaccount", "\"\"") +
|
+ 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"
|
"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"
|
"3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"amount (numeric) The total amount in btc received for this account.\n"
|
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received for this account.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nThe total amount in the wallet\n"
|
"\nThe total amount in the wallet\n"
|
||||||
+ HelpExampleCli("getbalance", "") +
|
+ HelpExampleCli("getbalance", "") +
|
||||||
|
@ -808,14 +808,15 @@ UniValue movecmd(const UniValue& params, bool fHelp)
|
||||||
"\nArguments:\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"
|
"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. \"toaccount\" (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. \"toaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
||||||
"3. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
"3. amount (numeric) Quantity of " + CURRENCY_UNIT + " to move between accounts.\n"
|
||||||
"4. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n"
|
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
||||||
|
"5. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"true|false (boolean) true if successful.\n"
|
"true|false (boolean) true if successful.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nMove 0.01 btc from the default account to the account named tabby\n"
|
"\nMove 0.01 " + CURRENCY_UNIT + " from the default account to the account named tabby\n"
|
||||||
+ HelpExampleCli("move", "\"\" \"tabby\" 0.01") +
|
+ HelpExampleCli("move", "\"\" \"tabby\" 0.01") +
|
||||||
"\nMove 0.01 btc timotei to akiko with a comment and funds have 6 confirmations\n"
|
"\nMove 0.01 " + CURRENCY_UNIT + " timotei to akiko with a comment and funds have 6 confirmations\n"
|
||||||
+ HelpExampleCli("move", "\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") +
|
+ HelpExampleCli("move", "\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") +
|
||||||
"\nAs a json rpc call\n"
|
"\nAs a json rpc call\n"
|
||||||
+ HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
|
+ HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
|
||||||
|
@ -882,7 +883,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
|
||||||
"\nArguments:\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"
|
"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"
|
"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"
|
"3. amount (numeric, required) The amount in " + CURRENCY_UNIT + " (transaction fee is added on top).\n"
|
||||||
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\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"
|
"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"
|
" This is not part of the transaction, just kept in your wallet.\n"
|
||||||
|
@ -892,7 +893,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"transactionid\" (string) The transaction id.\n"
|
"\"transactionid\" (string) The transaction id.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nSend 0.01 btc from the default account to the address, must have at least 1 confirmation\n"
|
"\nSend 0.01 " + CURRENCY_UNIT + " from the default account to the address, must have at least 1 confirmation\n"
|
||||||
+ HelpExampleCli("sendfrom", "\"\" \"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") +
|
+ HelpExampleCli("sendfrom", "\"\" \"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") +
|
||||||
"\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
|
"\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\"") +
|
+ HelpExampleCli("sendfrom", "\"tabby\" \"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"") +
|
||||||
|
@ -947,7 +948,7 @@ 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"
|
"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"
|
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"address\":amount (numeric) The zcash address is the key, the numeric amount in btc is the value\n"
|
" \"address\":amount (numeric) The zcash address is the key, the numeric amount in " + CURRENCY_UNIT + " is the value\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
|
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
|
||||||
|
@ -1248,7 +1249,7 @@ UniValue listreceivedbyaddress(const UniValue& params, bool fHelp)
|
||||||
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
|
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
|
||||||
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
|
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
|
||||||
" \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\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 " + CURRENCY_UNIT + " received by the address\n"
|
||||||
" \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n"
|
" \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
|
@ -1422,11 +1423,11 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
|
||||||
" transaction between accounts, and not associated with an address,\n"
|
" transaction between accounts, and not associated with an address,\n"
|
||||||
" transaction id or block. 'send' and 'receive' transactions are \n"
|
" transaction id or block. 'send' and 'receive' transactions are \n"
|
||||||
" associated with an address, transaction id and block details\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 " + CURRENCY_UNIT + ". This is negative for the 'send' category, and for the\n"
|
||||||
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
|
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
|
||||||
" and for the 'move' category for inbound funds.\n"
|
" and for the 'move' category for inbound funds.\n"
|
||||||
" \"vout\" : n, (numeric) the vout value\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 " + CURRENCY_UNIT + ". This is negative and only available for the \n"
|
||||||
" 'send' category of transactions.\n"
|
" 'send' category of transactions.\n"
|
||||||
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
|
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
|
||||||
" 'receive' category of transactions.\n"
|
" 'receive' category of transactions.\n"
|
||||||
|
@ -1618,10 +1619,10 @@ UniValue listsinceblock(const UniValue& params, bool fHelp)
|
||||||
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\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\":\"zcashaddress\", (string) The zcash 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"
|
" \"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 " + CURRENCY_UNIT + ". 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"
|
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
|
||||||
" \"vout\" : n, (numeric) the vout value\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 " + CURRENCY_UNIT + ". 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"
|
" \"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"
|
" \"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"
|
" \"blockindex\": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
|
||||||
|
@ -1704,7 +1705,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"
|
"2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"amount\" : x.xxx, (numeric) The transaction amount in btc\n"
|
" \"amount\" : x.xxx, (numeric) The transaction amount in " + CURRENCY_UNIT + "\n"
|
||||||
" \"confirmations\" : n, (numeric) The number of confirmations\n"
|
" \"confirmations\" : n, (numeric) The number of confirmations\n"
|
||||||
" \"blockhash\" : \"hash\", (string) The block hash\n"
|
" \"blockhash\" : \"hash\", (string) The block hash\n"
|
||||||
" \"blockindex\" : xx, (numeric) The block index\n"
|
" \"blockindex\" : xx, (numeric) The block index\n"
|
||||||
|
@ -1717,7 +1718,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
|
||||||
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\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\" : \"zcashaddress\", (string) The zcash address involved in the transaction\n"
|
||||||
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\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 " + CURRENCY_UNIT + "\n"
|
||||||
" \"vout\" : n, (numeric) the vout value\n"
|
" \"vout\" : n, (numeric) the vout value\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
|
@ -2224,7 +2225,7 @@ UniValue settxfee(const UniValue& params, bool fHelp)
|
||||||
"settxfee amount\n"
|
"settxfee amount\n"
|
||||||
"\nSet the transaction fee per kB.\n"
|
"\nSet the transaction fee per kB.\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
"1. amount (numeric, required) The transaction fee in BTC/kB rounded to the nearest 0.00000001\n"
|
"1. amount (numeric, required) The transaction fee in " + CURRENCY_UNIT + "/kB rounded to the nearest 0.00000001\n"
|
||||||
"\nResult\n"
|
"\nResult\n"
|
||||||
"true|false (boolean) Returns true if successful\n"
|
"true|false (boolean) Returns true if successful\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
|
@ -2253,14 +2254,14 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp)
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
||||||
" \"balance\": xxxxxxx, (numeric) the total confirmed zcash balance of the wallet\n"
|
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
|
||||||
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed zcash balance of the wallet\n"
|
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
|
||||||
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet\n"
|
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + CURRENCY_UNIT + "\n"
|
||||||
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in 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"
|
" \"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"
|
" \"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"
|
" \"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 " + CURRENCY_UNIT + "/kB\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("getwalletinfo", "")
|
+ HelpExampleCli("getwalletinfo", "")
|
||||||
|
@ -2338,7 +2339,7 @@ UniValue listunspent(const UniValue& params, bool fHelp)
|
||||||
" \"address\" : \"address\", (string) the zcash address\n"
|
" \"address\" : \"address\", (string) the zcash address\n"
|
||||||
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
|
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
|
||||||
" \"scriptPubKey\" : \"key\", (string) the script key\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 " + CURRENCY_UNIT + "\n"
|
||||||
" \"confirmations\" : n (numeric) The number of confirmations\n"
|
" \"confirmations\" : n (numeric) The number of confirmations\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
|
@ -3106,7 +3107,7 @@ UniValue z_getbalance(const UniValue& params, bool fHelp)
|
||||||
"1. \"address\" (string) The selected address. It may be a transparent or private address.\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"
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"amount (numeric) The total amount in ZEC received for this address.\n"
|
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received for this address.\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
"\nThe total amount received by address \"myaddress\"\n"
|
"\nThe total amount received by address \"myaddress\"\n"
|
||||||
+ HelpExampleCli("z_getbalance", "\"myaddress\"") +
|
+ HelpExampleCli("z_getbalance", "\"myaddress\"") +
|
||||||
|
@ -3331,7 +3332,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
||||||
"2. \"amounts\" (array, required) An array of json objects representing the amounts to send.\n"
|
"2. \"amounts\" (array, required) An array of json objects representing the amounts to send.\n"
|
||||||
" [{\n"
|
" [{\n"
|
||||||
" \"address\":address (string, required) The address is a taddr or zaddr\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"
|
" \"amount\":amount (numeric, required) The numeric amount in " + CURRENCY_UNIT + " is the value\n"
|
||||||
" \"memo\":memo (string, optional) If the address is a zaddr, raw data represented in hexadecimal string format\n"
|
" \"memo\":memo (string, optional) If the address is a zaddr, raw data represented in hexadecimal string format\n"
|
||||||
" }, ... ]\n"
|
" }, ... ]\n"
|
||||||
"3. minconf (numeric, optional, default=1) Only use funds confirmed at least this many times.\n"
|
"3. minconf (numeric, optional, default=1) Only use funds confirmed at least this many times.\n"
|
||||||
|
|
Loading…
Reference in New Issue