Update rpc strings.

This commit is contained in:
vertoe 2014-12-10 00:22:01 +01:00
parent 6089696ade
commit 8fbde6cfeb
3 changed files with 77 additions and 76 deletions

View File

@ -21,8 +21,8 @@
* *
* \section intro_sec Introduction * \section intro_sec Introduction
* *
* This is the developer documentation of the reference client for an experimental new digital currency called Bitcoin (http://www.bitcoin.org/), * This is the developer documentation of the reference client for an experimental new digital currency called Darkcoin (http://www.darkcoin.io/),
* which enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate * which enables instant payments to anyone, anywhere in the world. Darkcoin uses peer-to-peer technology to operate
* with no central authority: managing transactions and issuing money are carried out collectively by the network. * with no central authority: managing transactions and issuing money are carried out collectively by the network.
* *
* The software is a community-driven open source project, released under the MIT license. * The software is a community-driven open source project, released under the MIT license.
@ -86,14 +86,14 @@ bool AppInit(int argc, char* argv[])
if (mapArgs.count("-?") || mapArgs.count("--help")) if (mapArgs.count("-?") || mapArgs.count("--help"))
{ {
// First part of help message is specific to bitcoind / RPC client // First part of help message is specific to darkcoind / RPC client
std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" + std::string strUsage = _("Darkcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" +
_("Usage:") + "\n" + _("Usage:") + "\n" +
" bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n" + " darkcoind [options] " + _("Start Darkcoin Core Daemon") + "\n" +
_("Usage (deprecated, use bitcoin-cli):") + "\n" + _("Usage (deprecated, use darkcoin-cli):") + "\n" +
" bitcoind [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" + " darkcoind [options] <command> [params] " + _("Send command to Darkcoin Core") + "\n" +
" bitcoind [options] help " + _("List commands") + "\n" + " darkcoind [options] help " + _("List commands") + "\n" +
" bitcoind [options] help <command> " + _("Get help for a command") + "\n"; " darkcoind [options] help <command> " + _("Get help for a command") + "\n";
strUsage += "\n" + HelpMessage(HMM_BITCOIND); strUsage += "\n" + HelpMessage(HMM_BITCOIND);
strUsage += "\n" + HelpMessageCli(false); strUsage += "\n" + HelpMessageCli(false);
@ -105,7 +105,7 @@ bool AppInit(int argc, char* argv[])
// Command-line RPC // Command-line RPC
bool fCommandLine = false; bool fCommandLine = false;
for (int i = 1; i < argc; i++) for (int i = 1; i < argc; i++)
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "bitcoin:")) if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "darkcoin:"))
fCommandLine = true; fCommandLine = true;
if (fCommandLine) if (fCommandLine)
@ -117,7 +117,7 @@ bool AppInit(int argc, char* argv[])
fDaemon = GetBoolArg("-daemon", false); fDaemon = GetBoolArg("-daemon", false);
if (fDaemon) if (fDaemon)
{ {
fprintf(stdout, "Bitcoin server starting\n"); fprintf(stdout, "Darkcoin server starting\n");
// Daemonize // Daemonize
pid_t pid = fork(); pid_t pid = fork();
@ -177,7 +177,7 @@ int main(int argc, char* argv[])
bool fRet = false; bool fRet = false;
// Connect bitcoind signal handlers // Connect darkcoind signal handlers
noui_connect(); noui_connect();
fRet = AppInit(argc, argv); fRet = AppInit(argc, argv);

View File

@ -208,10 +208,10 @@ Value stop(const Array& params, bool fHelp)
if (fHelp || params.size() > 1) if (fHelp || params.size() > 1)
throw runtime_error( throw runtime_error(
"stop\n" "stop\n"
"\nStop Bitcoin server."); "\nStop Darkcoin server.");
// Shutdown will take long enough that the response should get back // Shutdown will take long enough that the response should get back
StartShutdown(); StartShutdown();
return "Bitcoin server stopping"; return "Darkcoin server stopping";
} }
@ -508,7 +508,7 @@ void StartRPCThreads()
{ {
unsigned char rand_pwd[32]; unsigned char rand_pwd[32];
RAND_bytes(rand_pwd, 32); RAND_bytes(rand_pwd, 32);
string strWhatAmI = "To use bitcoind"; string strWhatAmI = "To use darkcoind";
if (mapArgs.count("-server")) if (mapArgs.count("-server"))
strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); strWhatAmI = strprintf(_("To use the %s option"), "\"-server\"");
else if (mapArgs.count("-daemon")) else if (mapArgs.count("-daemon"))
@ -517,13 +517,13 @@ void StartRPCThreads()
_("%s, you must set a rpcpassword in the configuration file:\n" _("%s, you must set a rpcpassword in the configuration file:\n"
"%s\n" "%s\n"
"It is recommended you use the following random password:\n" "It is recommended you use the following random password:\n"
"rpcuser=bitcoinrpc\n" "rpcuser=darkcoinrpc\n"
"rpcpassword=%s\n" "rpcpassword=%s\n"
"(you do not need to remember this password)\n" "(you do not need to remember this password)\n"
"The username and password MUST NOT be the same.\n" "The username and password MUST NOT be the same.\n"
"If the file does not exist, create it with owner-readable-only file permissions.\n" "If the file does not exist, create it with owner-readable-only file permissions.\n"
"It is also recommended to set alertnotify so you are notified of problems;\n" "It is also recommended to set alertnotify so you are notified of problems;\n"
"for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"), "for example: alertnotify=echo %%s | mail -s \"Darkcoin Alert\" admin@foo.com\n"),
strWhatAmI, strWhatAmI,
GetConfigFile().string(), GetConfigFile().string(),
EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32)), EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32)),
@ -889,7 +889,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s
} }
std::string HelpExampleCli(string methodname, string args){ std::string HelpExampleCli(string methodname, string args){
return "> bitcoin-cli " + methodname + " " + args + "\n"; return "> darkcoin-cli " + methodname + " " + args + "\n";
} }
std::string HelpExampleRpc(string methodname, string args){ std::string HelpExampleRpc(string methodname, string args){

View File

@ -1,5 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014 vertoe & the Darkcoin developers
// Distributed under the MIT/X11 software license, see the accompanying // Distributed under the MIT/X11 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.
@ -76,13 +77,13 @@ Value getnewaddress(const Array& params, bool fHelp)
if (fHelp || params.size() > 1) if (fHelp || params.size() > 1)
throw runtime_error( throw runtime_error(
"getnewaddress ( \"account\" )\n" "getnewaddress ( \"account\" )\n"
"\nReturns a new Bitcoin address for receiving payments.\n" "\nReturns a new Darkcoin address for receiving payments.\n"
"If 'account' is specified (recommended), it is added to the address book \n" "If 'account' is specified (recommended), it is added to the address book \n"
"so payments received with the address will be credited to 'account'.\n" "so payments received with the address will be credited to 'account'.\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"account\" (string, optional) The account name for the address to be linked to. if not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n" "1. \"account\" (string, optional) The account name for the address to be linked to. if not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n"
"\nResult:\n" "\nResult:\n"
"\"bitcoinaddress\" (string) The new bitcoin address\n" "\"darkcoinaddress\" (string) The new darkcoin address\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("getnewaddress", "") + HelpExampleCli("getnewaddress", "")
+ HelpExampleCli("getnewaddress", "\"\"") + HelpExampleCli("getnewaddress", "\"\"")
@ -153,11 +154,11 @@ Value getaccountaddress(const Array& params, bool fHelp)
if (fHelp || params.size() != 1) if (fHelp || params.size() != 1)
throw runtime_error( throw runtime_error(
"getaccountaddress \"account\"\n" "getaccountaddress \"account\"\n"
"\nReturns the current Bitcoin address for receiving payments to this account.\n" "\nReturns the current Darkcoin address for receiving payments to this account.\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"account\" (string, required) The account name for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name.\n" "1. \"account\" (string, required) The account name for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name.\n"
"\nResult:\n" "\nResult:\n"
"\"bitcoinaddress\" (string) The account bitcoin address\n" "\"darkcoinaddress\" (string) The account darkcoin address\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("getaccountaddress", "") + HelpExampleCli("getaccountaddress", "")
+ HelpExampleCli("getaccountaddress", "\"\"") + HelpExampleCli("getaccountaddress", "\"\"")
@ -181,7 +182,7 @@ Value getrawchangeaddress(const Array& params, bool fHelp)
if (fHelp || params.size() > 1) if (fHelp || params.size() > 1)
throw runtime_error( throw runtime_error(
"getrawchangeaddress\n" "getrawchangeaddress\n"
"\nReturns a new Bitcoin address, for receiving change.\n" "\nReturns a new Darkcoin address, for receiving change.\n"
"This is for use with raw transactions, NOT normal use.\n" "This is for use with raw transactions, NOT normal use.\n"
"\nResult:\n" "\nResult:\n"
"\"address\" (string) The address\n" "\"address\" (string) The address\n"
@ -210,19 +211,19 @@ Value setaccount(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() < 1 || params.size() > 2) if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error( throw runtime_error(
"setaccount \"bitcoinaddress\" \"account\"\n" "setaccount \"darkcoinaddress\" \"account\"\n"
"\nSets the account associated with the given address.\n" "\nSets the account associated with the given address.\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"bitcoinaddress\" (string, required) The bitcoin address to be associated with an account.\n" "1. \"darkcoinaddress\" (string, required) The darkcoin address to be associated with an account.\n"
"2. \"account\" (string, required) The account to assign the address to.\n" "2. \"account\" (string, required) The account to assign the address to.\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"") + HelpExampleCli("setaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"tabby\"")
+ HelpExampleRpc("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"tabby\"") + HelpExampleRpc("setaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", \"tabby\"")
); );
CBitcoinAddress address(params[0].get_str()); CBitcoinAddress address(params[0].get_str());
if (!address.IsValid()) if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address");
string strAccount; string strAccount;
@ -247,20 +248,20 @@ Value getaccount(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() != 1) if (fHelp || params.size() != 1)
throw runtime_error( throw runtime_error(
"getaccount \"bitcoinaddress\"\n" "getaccount \"darkcoinaddress\"\n"
"\nReturns the account associated with the given address.\n" "\nReturns the account associated with the given address.\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"bitcoinaddress\" (string, required) The bitcoin address for account lookup.\n" "1. \"darkcoinaddress\" (string, required) The darkcoin address for account lookup.\n"
"\nResult:\n" "\nResult:\n"
"\"accountname\" (string) the account address\n" "\"accountname\" (string) the account address\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") + HelpExampleCli("getaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"")
+ HelpExampleRpc("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") + HelpExampleRpc("getaccount", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"")
); );
CBitcoinAddress address(params[0].get_str()); CBitcoinAddress address(params[0].get_str());
if (!address.IsValid()) if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address");
string strAccount; string strAccount;
map<CTxDestination, CAddressBookData>::iterator mi = pwalletMain->mapAddressBook.find(address.Get()); map<CTxDestination, CAddressBookData>::iterator mi = pwalletMain->mapAddressBook.find(address.Get());
@ -280,7 +281,7 @@ Value getaddressesbyaccount(const Array& params, bool fHelp)
"1. \"account\" (string, required) The account name.\n" "1. \"account\" (string, required) The account name.\n"
"\nResult:\n" "\nResult:\n"
"[ (json array of string)\n" "[ (json array of string)\n"
" \"bitcoinaddress\" (string) a bitcoin address associated with the given account\n" " \"darkcoinaddress\" (string) a darkcoin address associated with the given account\n"
" ,...\n" " ,...\n"
"]\n" "]\n"
"\nExamples:\n" "\nExamples:\n"
@ -306,11 +307,11 @@ Value sendtoaddress(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() < 2 || params.size() > 4) if (fHelp || params.size() < 2 || params.size() > 4)
throw runtime_error( throw runtime_error(
"sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" )\n" "sendtoaddress \"darkcoinaddress\" amount ( \"comment\" \"comment-to\" )\n"
"\nSent an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n" "\nSent an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
+ HelpRequiringPassphrase() + + HelpRequiringPassphrase() +
"\nArguments:\n" "\nArguments:\n"
"1. \"bitcoinaddress\" (string, required) The bitcoin address to send to.\n" "1. \"darkcoinaddress\" (string, required) The darkcoin 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 btc 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"
@ -327,7 +328,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
CBitcoinAddress address(params[0].get_str()); CBitcoinAddress address(params[0].get_str());
if (!address.IsValid()) if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address");
// Amount // Amount
int64_t nAmount = AmountFromValue(params[1]); int64_t nAmount = AmountFromValue(params[1]);
@ -360,7 +361,7 @@ Value listaddressgroupings(const Array& params, bool fHelp)
"[\n" "[\n"
" [\n" " [\n"
" [\n" " [\n"
" \"bitcoinaddress\", (string) The bitcoin address\n" " \"darkcoinaddress\", (string) The darkcoin address\n"
" amount, (numeric) The amount in btc\n" " amount, (numeric) The amount in btc\n"
" \"account\" (string, optional) The account\n" " \"account\" (string, optional) The account\n"
" ]\n" " ]\n"
@ -399,11 +400,11 @@ Value signmessage(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() != 2) if (fHelp || params.size() != 2)
throw runtime_error( throw runtime_error(
"signmessage \"bitcoinaddress\" \"message\"\n" "signmessage \"darkcoinaddress\" \"message\"\n"
"\nSign a message with the private key of an address" "\nSign a message with the private key of an address"
+ HelpRequiringPassphrase() + "\n" + HelpRequiringPassphrase() + "\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the private key.\n" "1. \"darkcoinaddress\" (string, required) The darkcoin address to use for the private key.\n"
"2. \"message\" (string, required) The message to create a signature of.\n" "2. \"message\" (string, required) The message to create a signature of.\n"
"\nResult:\n" "\nResult:\n"
"\"signature\" (string) The signature of the message encoded in base 64\n" "\"signature\" (string) The signature of the message encoded in base 64\n"
@ -411,11 +412,11 @@ Value signmessage(const Array& params, bool fHelp)
"\nUnlock the wallet for 30 seconds\n" "\nUnlock the wallet for 30 seconds\n"
+ HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") + + HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") +
"\nCreate the signature\n" "\nCreate the signature\n"
+ HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"") + + HelpExampleCli("signmessage", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"my message\"") +
"\nVerify the signature\n" "\nVerify the signature\n"
+ HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"") + + HelpExampleCli("verifymessage", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"signature\" \"my message\"") +
"\nAs json rpc\n" "\nAs json rpc\n"
+ HelpExampleRpc("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"my message\"") + HelpExampleRpc("signmessage", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", \"my message\"")
); );
EnsureWalletIsUnlocked(); EnsureWalletIsUnlocked();
@ -450,29 +451,29 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() < 1 || params.size() > 2) if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error( throw runtime_error(
"getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n" "getreceivedbyaddress \"darkcoinaddress\" ( minconf )\n"
"\nReturns the total amount received by the given bitcoinaddress in transactions with at least minconf confirmations.\n" "\nReturns the total amount received by the given darkcoinaddress in transactions with at least minconf confirmations.\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"bitcoinaddress\" (string, required) The bitcoin address for transactions.\n" "1. \"darkcoinaddress\" (string, required) The darkcoin 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 btc 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", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") + + HelpExampleCli("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"") +
"\nThe amount including unconfirmed transactions, zero confirmations\n" "\nThe amount including unconfirmed transactions, zero confirmations\n"
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 0") + + HelpExampleCli("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0") +
"\nThe amount with at least 6 confirmation, very safe\n" "\nThe amount with at least 6 confirmation, very safe\n"
+ HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 6") + + HelpExampleCli("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 6") +
"\nAs a json rpc call\n" "\nAs a json rpc call\n"
+ HelpExampleRpc("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", 6") + HelpExampleRpc("getreceivedbyaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", 6")
); );
// Bitcoin address // Darkcoin address
CBitcoinAddress address = CBitcoinAddress(params[0].get_str()); CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
CScript scriptPubKey; CScript scriptPubKey;
if (!address.IsValid()) if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address");
scriptPubKey.SetDestination(address.Get()); scriptPubKey.SetDestination(address.Get());
if (!IsMine(*pwalletMain,scriptPubKey)) if (!IsMine(*pwalletMain,scriptPubKey))
return (double)0.0; return (double)0.0;
@ -732,13 +733,13 @@ Value sendfrom(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() < 3 || params.size() > 6) if (fHelp || params.size() < 3 || params.size() > 6)
throw runtime_error( throw runtime_error(
"sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n" "sendfrom \"fromaccount\" \"todarkcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
"\nSent an amount from an account to a bitcoin address.\n" "\nSent an amount from an account to a darkcoin address.\n"
"The amount is a real and is rounded to the nearest 0.00000001." "The amount is a real and is rounded to the nearest 0.00000001."
+ HelpRequiringPassphrase() + "\n" + HelpRequiringPassphrase() + "\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"fromaccount\" (string, required) The name of the account to send funds from. May be the default account using \"\".\n" "1. \"fromaccount\" (string, required) The name of the account to send funds from. May be the default account using \"\".\n"
"2. \"tobitcoinaddress\" (string, required) The bitcoin address to send funds to.\n" "2. \"todarkcoinaddress\" (string, required) The darkcoin 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 btc. (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"
@ -760,7 +761,7 @@ Value sendfrom(const Array& params, bool fHelp)
string strAccount = AccountFromValue(params[0]); string strAccount = AccountFromValue(params[0]);
CBitcoinAddress address(params[1].get_str()); CBitcoinAddress address(params[1].get_str());
if (!address.IsValid()) if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Darkcoin address");
int64_t nAmount = AmountFromValue(params[2]); int64_t nAmount = AmountFromValue(params[2]);
int nMinDepth = 1; int nMinDepth = 1;
if (params.size() > 3) if (params.size() > 3)
@ -800,7 +801,7 @@ Value sendmany(const Array& params, bool fHelp)
"1. \"fromaccount\" (string, required) The account to send the funds from, can be \"\" for the default account\n" "1. \"fromaccount\" (string, required) The account to send the funds from, can be \"\" for the default account\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 bitcoin address is the key, the numeric amount in btc is the value\n" " \"address\":amount (numeric) The darkcoin address is the key, the numeric amount in btc 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"
@ -810,11 +811,11 @@ Value sendmany(const Array& params, bool fHelp)
" the number of addresses.\n" " the number of addresses.\n"
"\nExamples:\n" "\nExamples:\n"
"\nSend two amounts to two different addresses:\n" "\nSend two amounts to two different addresses:\n"
+ HelpExampleCli("sendmany", "\"tabby\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") + + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") +
"\nSend two amounts to two different addresses setting the confirmation and comment:\n" "\nSend two amounts to two different addresses setting the confirmation and comment:\n"
+ HelpExampleCli("sendmany", "\"tabby\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") + + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") +
"\nAs a json rpc call\n" "\nAs a json rpc call\n"
+ HelpExampleRpc("sendmany", "\"tabby\", \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"") + HelpExampleRpc("sendmany", "\"tabby\", \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"")
); );
string strAccount = AccountFromValue(params[0]); string strAccount = AccountFromValue(params[0]);
@ -836,7 +837,7 @@ Value sendmany(const Array& params, bool fHelp)
{ {
CBitcoinAddress address(s.name_); CBitcoinAddress address(s.name_);
if (!address.IsValid()) if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+s.name_); throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Darkcoin address: ")+s.name_);
if (setAddress.count(address)) if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
@ -879,26 +880,26 @@ Value addmultisigaddress(const Array& params, bool fHelp)
{ {
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n" string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n" "\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
"Each key is a Bitcoin address or hex-encoded public key.\n" "Each key is a Darkcoin address or hex-encoded public key.\n"
"If 'account' is specified, assign address to that account.\n" "If 'account' is specified, assign address to that account.\n"
"\nArguments:\n" "\nArguments:\n"
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\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 bitcoin addresses or hex-encoded public keys\n" "2. \"keysobject\" (string, required) A json array of darkcoin addresses or hex-encoded public keys\n"
" [\n" " [\n"
" \"address\" (string) bitcoin address or hex-encoded public key\n" " \"address\" (string) darkcoin address or hex-encoded public key\n"
" ...,\n" " ...,\n"
" ]\n" " ]\n"
"3. \"account\" (string, optional) An account to assign the addresses to.\n" "3. \"account\" (string, optional) An account to assign the addresses to.\n"
"\nResult:\n" "\nResult:\n"
"\"bitcoinaddress\" (string) A bitcoin address associated with the keys.\n" "\"darkcoinaddress\" (string) A darkcoin address associated with the keys.\n"
"\nExamples:\n" "\nExamples:\n"
"\nAdd a multisig address from 2 addresses\n" "\nAdd a multisig address from 2 addresses\n"
+ HelpExampleCli("addmultisigaddress", "2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") + + HelpExampleCli("addmultisigaddress", "2 \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrs\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK1\\\"]\"") +
"\nAs json rpc call\n" "\nAs json rpc call\n"
+ HelpExampleRpc("addmultisigaddress", "2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"") + HelpExampleRpc("addmultisigaddress", "2, \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrs\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK1\\\"]\"")
; ;
throw runtime_error(msg); throw runtime_error(msg);
} }
@ -1192,7 +1193,7 @@ Value listtransactions(const Array& params, bool fHelp)
" {\n" " {\n"
" \"account\":\"accountname\", (string) The account name associated with the transaction. \n" " \"account\":\"accountname\", (string) The account name associated with the transaction. \n"
" It will be \"\" for the default account.\n" " It will be \"\" for the default account.\n"
" \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for \n" " \"address\":\"darkcoinaddress\", (string) The darkcoin address of the transaction. Not present for \n"
" move transactions (category = move).\n" " move transactions (category = move).\n"
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\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 between accounts, and not associated with an address,\n"
@ -1365,7 +1366,7 @@ Value listsinceblock(const Array& params, bool fHelp)
"{\n" "{\n"
" \"transactions\": [\n" " \"transactions\": [\n"
" \"account\":\"accountname\", (string) The account name associated with the transaction. Will be \"\" for the default account.\n" " \"account\":\"accountname\", (string) The account name associated with the transaction. Will be \"\" for the default account.\n"
" \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).\n" " \"address\":\"darkcoinaddress\", (string) The darkcoin 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 btc. 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"
@ -1452,7 +1453,7 @@ Value gettransaction(const Array& params, bool fHelp)
" \"details\" : [\n" " \"details\" : [\n"
" {\n" " {\n"
" \"account\" : \"accountname\", (string) The account name involved in the transaction, can be \"\" for the default account.\n" " \"account\" : \"accountname\", (string) The account name involved in the transaction, can be \"\" for the default account.\n"
" \"address\" : \"bitcoinaddress\", (string) The bitcoin address involved in the transaction\n" " \"address\" : \"darkcoinaddress\", (string) The darkcoin 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 btc\n"
" }\n" " }\n"
@ -1564,7 +1565,7 @@ Value walletpassphrase(const Array& params, bool fHelp)
throw runtime_error( throw runtime_error(
"walletpassphrase \"passphrase\" timeout\n" "walletpassphrase \"passphrase\" timeout\n"
"\nStores the wallet decryption key in memory for 'timeout' seconds.\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 bitcoins\n" "This is needed prior to performing transactions related to private keys such as sending darkcoins\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"passphrase\" (string, required) The wallet passphrase\n" "1. \"passphrase\" (string, required) The wallet passphrase\n"
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n" "2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
@ -1704,10 +1705,10 @@ Value encryptwallet(const Array& params, bool fHelp)
"\nExamples:\n" "\nExamples:\n"
"\nEncrypt you wallet\n" "\nEncrypt you wallet\n"
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") + + HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
"\nNow set the passphrase to use the wallet, such as for signing or sending bitcoin\n" "\nNow set the passphrase to use the wallet, such as for signing or sending darkcoin\n"
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") + + HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
"\nNow we can so something like sign\n" "\nNow we can so something like sign\n"
+ HelpExampleCli("signmessage", "\"bitcoinaddress\" \"test message\"") + + HelpExampleCli("signmessage", "\"darkcoinaddress\" \"test message\"") +
"\nNow lock the wallet again by removing the passphrase\n" "\nNow lock the wallet again by removing the passphrase\n"
+ HelpExampleCli("walletlock", "") + + HelpExampleCli("walletlock", "") +
"\nAs a json rpc call\n" "\nAs a json rpc call\n"
@ -1737,7 +1738,7 @@ Value encryptwallet(const Array& params, bool fHelp)
// slack space in .dat files; that is bad if the old data is // slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So: // unencrypted private keys. So:
StartShutdown(); StartShutdown();
return "wallet encrypted; Bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; return "wallet encrypted; darkcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
} }
Value lockunspent(const Array& params, bool fHelp) Value lockunspent(const Array& params, bool fHelp)
@ -1747,7 +1748,7 @@ Value lockunspent(const Array& params, bool fHelp)
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n" "lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
"\nUpdates list of temporarily unspendable outputs.\n" "\nUpdates list of temporarily unspendable outputs.\n"
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction 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 bitcoins.\n" "A locked transaction output will not be chosen by automatic coin selection, when spending darkcoins.\n"
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\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" "is always cleared (by virtue of process exit) when a node stops or fails.\n"
"Also see the listunspent call\n" "Also see the listunspent call\n"
@ -1896,7 +1897,7 @@ Value getwalletinfo(const Array& 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 bitcoin balance of the wallet\n" " \"balance\": xxxxxxx, (numeric) the total darkcoin balance of the wallet\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"