From 67a6bdb11cd2d75e654107f7f7c590e8fa838433 Mon Sep 17 00:00:00 2001 From: nzsquirrell Date: Wed, 2 Mar 2016 19:39:46 +1300 Subject: [PATCH] rpc help updates + enhance getblockchaininfo rpc call --- src/rpcblockchain.cpp | 12 ++- src/rpcmining.cpp | 7 +- src/rpcmisc.cpp | 15 +++- src/wallet/rpcdump.cpp | 14 ++-- src/wallet/rpcwallet.cpp | 160 +++++++++++++++++++-------------------- 5 files changed, 115 insertions(+), 93 deletions(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index afdf68a9..5f5ece9a 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -557,7 +557,12 @@ Value getblockchaininfo(const Array& params, bool fHelp) " \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n" " \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n" " \"bestblockhash\": \"...\", (string) the hash of the currently best block\n" - " \"difficulty\": xxxxxx, (numeric) the current difficulty\n" + " \"difficulty\": xxxxxx, (numeric) the current difficulty for configured algorithm\n" + " \"difficulty_sha256d\": xxxxxx, (numeric) the current difficulty for sha256d\n" + " \"difficulty_scrypt\": xxxxxx, (numeric) the current difficulty for scrypt\n" + " \"difficulty_groestl\": xxxxxx, (numeric) the current difficulty for myr-groestl\n" + " \"difficulty_skein\": xxxxxx, (numeric) the current difficulty for skein\n" + " \"difficulty_qubit\": xxxxxx, (numeric) the current difficulty for qubit\n" " \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n" " \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n" " \"softforks\": [ (array) status of softforks in progress\n" @@ -587,6 +592,11 @@ Value getblockchaininfo(const Array& params, bool fHelp) obj.push_back(Pair("headers", pindexBestHeader ? pindexBestHeader->nHeight : -1)); obj.push_back(Pair("bestblockhash", chainActive.Tip()->GetBlockHash().GetHex())); obj.push_back(Pair("difficulty", (double)GetDifficulty(NULL, miningAlgo))); + obj.push_back(Pair("difficulty_sha256d", (double)GetDifficulty(NULL, ALGO_SHA256D))); + obj.push_back(Pair("difficulty_scrypt", (double)GetDifficulty(NULL, ALGO_SCRYPT))); + obj.push_back(Pair("difficulty_groestl", (double)GetDifficulty(NULL, ALGO_GROESTL))); + obj.push_back(Pair("difficulty_skein", (double)GetDifficulty(NULL, ALGO_SKEIN))); + obj.push_back(Pair("difficulty_qubit", (double)GetDifficulty(NULL, ALGO_QUBIT))); obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.Tip()))); obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex())); obj.push_back(Pair("pruned", fPruneMode)); diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index db2f3088..696d3944 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -234,7 +234,12 @@ Value getmininginfo(const Array& params, bool fHelp) " \"blocks\": nnn, (numeric) The current block\n" " \"currentblocksize\": nnn, (numeric) The last block size\n" " \"currentblocktx\": nnn, (numeric) The last block transaction\n" - " \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n" + " \"difficulty\": xxx.xxxxx (numeric) The current difficulty for configured algorithm\n" + " \"difficulty_sha256d\": xxxxxx, (numeric) the current difficulty for sha256d\n" + " \"difficulty_scrypt\": xxxxxx, (numeric) the current difficulty for scrypt\n" + " \"difficulty_groestl\": xxxxxx, (numeric) the current difficulty for myr-groestl\n" + " \"difficulty_skein\": xxxxxx, (numeric) the current difficulty for skein\n" + " \"difficulty_qubit\": xxxxxx, (numeric) the current difficulty for qubit\n" " \"errors\": \"...\" (string) Current errors\n" " \"generate\": true|false (boolean) If the generation is on or off (see getgenerate or setgenerate calls)\n" " \"genproclimit\": n (numeric) The processor limit for generation. -1 if no generation. (see getgenerate or setgenerate calls)\n" diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp index 5276bf76..2bcf30f2 100644 --- a/src/rpcmisc.cpp +++ b/src/rpcmisc.cpp @@ -55,7 +55,14 @@ Value getinfo(const Array& params, bool fHelp) " \"timeoffset\": xxxxx, (numeric) the time offset\n" " \"connections\": xxxxx, (numeric) the number of connections\n" " \"proxy\": \"host:port\", (string, optional) the proxy used by the server\n" - " \"difficulty\": xxxxxx, (numeric) the current difficulty\n" + " \"pow_algo_id\": xxxxxx, (numeric) the configured algorithm id\n" + " \"pow_algo\": xxxxxx, (string) the configured algorithm\n" + " \"difficulty\": xxxxxx, (numeric) the current difficulty for configured algorithm\n" + " \"difficulty_sha256d\": xxxxxx, (numeric) the current difficulty for sha256d\n" + " \"difficulty_scrypt\": xxxxxx, (numeric) the current difficulty for scrypt\n" + " \"difficulty_groestl\": xxxxxx, (numeric) the current difficulty for myr-groestl\n" + " \"difficulty_skein\": xxxxxx, (numeric) the current difficulty for skein\n" + " \"difficulty_qubit\": xxxxxx, (numeric) the current difficulty for qubit\n" " \"testnet\": true|false, (boolean) if the server is using testnet or not\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" @@ -165,10 +172,10 @@ Value validateaddress(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( - "validateaddress \"myriadcoinaddress\"\n" - "\nReturn information about the given myriadcoin address.\n" + "validateaddress \"myriadaddress\"\n" + "\nReturn information about the given myriad address.\n" "\nArguments:\n" - "1. \"myriadcoinaddress\" (string, required) The myriadcoin address to validate\n" + "1. \"myriadaddress\" (string, required) The myriad address to validate\n" "\nResult:\n" "{\n" " \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n" diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index ab951d1d..b512fe28 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -77,7 +77,7 @@ Value importprivkey(const Array& params, bool fHelp) if (fHelp || params.size() < 1 || params.size() > 3) throw runtime_error( - "importprivkey \"bitcoinprivkey\" ( \"label\" rescan )\n" + "importprivkey \"myriadprivkey\" ( \"label\" rescan )\n" "\nAdds a private key (as returned by dumpprivkey) to your wallet.\n" "\nArguments:\n" "1. \"bitcoinprivkey\" (string, required) The private key (see dumpprivkey)\n" @@ -178,7 +178,7 @@ Value importaddress(const Array& params, bool fHelp) std::vector data(ParseHex(params[0].get_str())); script = CScript(data.begin(), data.end()); } else { - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Myriad address or script"); } string strLabel = ""; @@ -328,11 +328,11 @@ Value dumpprivkey(const Array& params, bool fHelp) if (fHelp || params.size() != 1) throw runtime_error( - "dumpprivkey \"bitcoinaddress\"\n" - "\nReveals the private key corresponding to 'bitcoinaddress'.\n" + "dumpprivkey \"myriadaddress\"\n" + "\nReveals the private key corresponding to 'myriadaddress'.\n" "Then the importprivkey can be used with this output\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address for the private key\n" + "1. \"myriadaddress\" (string, required) The myriad address for the private key\n" "\nResult:\n" "\"key\" (string) The private key\n" "\nExamples:\n" @@ -348,7 +348,7 @@ Value dumpprivkey(const Array& params, bool fHelp) string strAddress = params[0].get_str(); CBitcoinAddress address; if (!address.SetString(strAddress)) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Myriad address"); CKeyID keyID; if (!address.GetKeyID(keyID)) throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key"); @@ -398,7 +398,7 @@ Value dumpwallet(const Array& params, bool fHelp) std::sort(vKeyBirth.begin(), vKeyBirth.end()); // produce output - file << strprintf("# Wallet dump created by Bitcoin %s (%s)\n", CLIENT_BUILD, CLIENT_DATE); + file << strprintf("# Wallet dump created by Myriad %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())); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 62699716..331faaf2 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -95,13 +95,13 @@ Value getnewaddress(const Array& params, bool fHelp) if (fHelp || params.size() > 1) throw runtime_error( "getnewaddress ( \"account\" )\n" - "\nReturns a new Bitcoin address for receiving payments.\n" + "\nReturns a new Myriad address for receiving payments.\n" "If 'account' is specified (DEPRECATED), it is added to the address book \n" "so payments received with the address will be credited to 'account'.\n" "\nArguments:\n" "1. \"account\" (string, optional) DEPRECATED. 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" - "\"bitcoinaddress\" (string) The new bitcoin address\n" + "\"myriadaddress\" (string) The new myriad address\n" "\nExamples:\n" + HelpExampleCli("getnewaddress", "") + HelpExampleRpc("getnewaddress", "") @@ -174,11 +174,11 @@ Value getaccountaddress(const Array& params, bool fHelp) if (fHelp || params.size() != 1) throw runtime_error( "getaccountaddress \"account\"\n" - "\nDEPRECATED. Returns the current Bitcoin address for receiving payments to this account.\n" + "\nDEPRECATED. Returns the current Myriad address for receiving payments to this account.\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" "\nResult:\n" - "\"bitcoinaddress\" (string) The account bitcoin address\n" + "\"myriadaddress\" (string) The account myriad address\n" "\nExamples:\n" + HelpExampleCli("getaccountaddress", "") + HelpExampleCli("getaccountaddress", "\"\"") @@ -206,7 +206,7 @@ Value getrawchangeaddress(const Array& params, bool fHelp) if (fHelp || params.size() > 1) throw runtime_error( "getrawchangeaddress\n" - "\nReturns a new Bitcoin address, for receiving change.\n" + "\nReturns a new Myriad address, for receiving change.\n" "This is for use with raw transactions, NOT normal use.\n" "\nResult:\n" "\"address\" (string) The address\n" @@ -240,21 +240,21 @@ Value setaccount(const Array& params, bool fHelp) if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "setaccount \"bitcoinaddress\" \"account\"\n" + "setaccount \"myriadaddress\" \"account\"\n" "\nDEPRECATED. Sets the account associated with the given address.\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address to be associated with an account.\n" + "1. \"myriadaddress\" (string, required) The myriad address to be associated with an account.\n" "2. \"account\" (string, required) The account to assign the address to.\n" "\nExamples:\n" - + HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"") - + HelpExampleRpc("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"tabby\"") + + HelpExampleCli("setaccount", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\" \"tabby\"") + + HelpExampleRpc("setaccount", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\", \"tabby\"") ); LOCK2(cs_main, pwalletMain->cs_wallet); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Myriad address"); string strAccount; if (params.size() > 1) @@ -286,22 +286,22 @@ Value getaccount(const Array& params, bool fHelp) if (fHelp || params.size() != 1) throw runtime_error( - "getaccount \"bitcoinaddress\"\n" + "getaccount \"myriadaddress\"\n" "\nDEPRECATED. Returns the account associated with the given address.\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address for account lookup.\n" + "1. \"myriadaddress\" (string, required) The myriad address for account lookup.\n" "\nResult:\n" "\"accountname\" (string) the account address\n" "\nExamples:\n" - + HelpExampleCli("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") - + HelpExampleRpc("getaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") + + HelpExampleCli("getaccount", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\"") + + HelpExampleRpc("getaccount", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\"") ); LOCK2(cs_main, pwalletMain->cs_wallet); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Myriad address"); string strAccount; map::iterator mi = pwalletMain->mapAddressBook.find(address.Get()); @@ -324,7 +324,7 @@ Value getaddressesbyaccount(const Array& params, bool fHelp) "1. \"account\" (string, required) The account name.\n" "\nResult:\n" "[ (json array of string)\n" - " \"bitcoinaddress\" (string) a bitcoin address associated with the given account\n" + " \"myriadaddress\" (string) a myriad address associated with the given account\n" " ,...\n" "]\n" "\nExamples:\n" @@ -386,19 +386,19 @@ Value sendtoaddress(const Array& params, bool fHelp) if (fHelp || params.size() < 2 || params.size() > 5) throw runtime_error( - "sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n" + "sendtoaddress \"myriadaddress\" 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. \"bitcoinaddress\" (string, required) The bitcoin address to send to.\n" - "2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n" + "1. \"myriadaddress\" (string, required) The myriad address to send to.\n" + "2. \"amount\" (numeric, required) The amount in MYR 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 bitcoins than you enter in the amount field.\n" + " The recipient will receive less myriad than you enter in the amount field.\n" "\nResult:\n" "\"transactionid\" (string) The transaction id.\n" "\nExamples:\n" @@ -412,7 +412,7 @@ Value sendtoaddress(const Array& params, bool fHelp) CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Myriad address"); // Amount CAmount nAmount = AmountFromValue(params[1]); @@ -450,8 +450,8 @@ Value listaddressgroupings(const Array& params, bool fHelp) "[\n" " [\n" " [\n" - " \"bitcoinaddress\", (string) The bitcoin address\n" - " amount, (numeric) The amount in btc\n" + " \"myriadaddress\", (string) The myriad address\n" + " amount, (numeric) The amount in MYR\n" " \"account\" (string, optional) The account (DEPRECATED)\n" " ]\n" " ,...\n" @@ -493,11 +493,11 @@ Value signmessage(const Array& params, bool fHelp) if (fHelp || params.size() != 2) throw runtime_error( - "signmessage \"bitcoinaddress\" \"message\"\n" + "signmessage \"myriadaddress\" \"message\"\n" "\nSign a message with the private key of an address" + HelpRequiringPassphrase() + "\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the private key.\n" + "1. \"myriadaddress\" (string, required) The myriad 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" @@ -505,11 +505,11 @@ Value signmessage(const Array& params, bool fHelp) "\nUnlock the wallet for 30 seconds\n" + HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") + "\nCreate the signature\n" - + HelpExampleCli("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"") + + + HelpExampleCli("signmessage", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\" \"my message\"") + "\nVerify the signature\n" - + HelpExampleCli("verifymessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"") + + + HelpExampleCli("verifymessage", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\" \"signature\" \"my message\"") + "\nAs json rpc\n" - + HelpExampleRpc("signmessage", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"my message\"") + + HelpExampleRpc("signmessage", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\", \"my message\"") ); LOCK2(cs_main, pwalletMain->cs_wallet); @@ -549,22 +549,22 @@ Value getreceivedbyaddress(const Array& params, bool fHelp) if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n" - "\nReturns the total amount received by the given bitcoinaddress in transactions with at least minconf confirmations.\n" + "getreceivedbyaddress \"myriadaddress\" ( minconf )\n" + "\nReturns the total amount received by the given myriadaddress in transactions with at least minconf confirmations.\n" "\nArguments:\n" - "1. \"bitcoinaddress\" (string, required) The bitcoin address for transactions.\n" + "1. \"myriadaddress\" (string, required) The myriad 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 MYR received at this address.\n" "\nExamples:\n" "\nThe amount from transactions with at least 1 confirmation\n" - + HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"") + + + HelpExampleCli("getreceivedbyaddress", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\"") + "\nThe amount including unconfirmed transactions, zero confirmations\n" - + HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 0") + + + HelpExampleCli("getreceivedbyaddress", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\" 0") + "\nThe amount with at least 6 confirmation, very safe\n" - + HelpExampleCli("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 6") + + + HelpExampleCli("getreceivedbyaddress", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\" 6") + "\nAs a json rpc call\n" - + HelpExampleRpc("getreceivedbyaddress", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", 6") + + HelpExampleRpc("getreceivedbyaddress", "\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\", 6") ); LOCK2(cs_main, pwalletMain->cs_wallet); @@ -572,7 +572,7 @@ Value getreceivedbyaddress(const Array& params, bool fHelp) // Bitcoin address CBitcoinAddress address = CBitcoinAddress(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Myriad address"); CScript scriptPubKey = GetScriptForDestination(address.Get()); if (!IsMine(*pwalletMain,scriptPubKey)) return (double)0.0; @@ -613,7 +613,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp) "1. \"account\" (string, required) The selected account, may be the default account using \"\".\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 MYR received for this account.\n" "\nExamples:\n" "\nAmount received by the default account with at least 1 confirmation\n" + HelpExampleCli("getreceivedbyaccount", "\"\"") + @@ -706,7 +706,7 @@ Value getbalance(const Array& 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 MYR received for this account.\n" "\nExamples:\n" "\nThe total amount in the wallet\n" + HelpExampleCli("getbalance", "") + @@ -797,9 +797,9 @@ Value movecmd(const Array& params, bool fHelp) "\nResult:\n" "true|false (boolean) true if successful.\n" "\nExamples:\n" - "\nMove 0.01 btc from the default account to the account named tabby\n" + "\nMove 0.01 MYR from the default account to the account named tabby\n" + HelpExampleCli("move", "\"\" \"tabby\" 0.01") + - "\nMove 0.01 btc timotei to akiko with a comment and funds have 6 confirmations\n" + "\nMove 0.01 MYR timotei to akiko with a comment and funds have 6 confirmations\n" + HelpExampleCli("move", "\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") + "\nAs a json rpc call\n" + HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"") @@ -857,14 +857,14 @@ Value sendfrom(const Array& params, bool fHelp) if (fHelp || params.size() < 3 || params.size() > 6) throw runtime_error( - "sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n" - "\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a bitcoin address.\n" + "sendfrom \"fromaccount\" \"tomyriadaddress\" amount ( minconf \"comment\" \"comment-to\" )\n" + "\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a myriad address.\n" "The amount is a real and is rounded to the nearest 0.00000001." + HelpRequiringPassphrase() + "\n" "\nArguments:\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" - "3. amount (numeric, required) The amount in btc. (transaction fee is added on top).\n" + "2. \"tomyriadaddress\" (string, required) The myriad address to send funds to.\n" + "3. amount (numeric, required) The amount in MYR. (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" @@ -874,7 +874,7 @@ Value sendfrom(const Array& 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" + "\nSend 0.01 MYR from the default account to the address, must have at least 1 confirmation\n" + HelpExampleCli("sendfrom", "\"\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") + "\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n" + HelpExampleCli("sendfrom", "\"tabby\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"") + @@ -887,7 +887,7 @@ Value sendfrom(const Array& 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 Bitcoin address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Myriad address"); CAmount nAmount = AmountFromValue(params[2]); int nMinDepth = 1; if (params.size() > 3) @@ -927,14 +927,14 @@ Value sendmany(const Array& params, bool fHelp) "1. \"fromaccount\" (string, required) DEPRECATED. The account to send the funds from. Should be \"\" for the default account\n" "2. \"amounts\" (string, required) A json object with addresses and amounts\n" " {\n" - " \"address\":amount (numeric) The bitcoin address is the key, the numeric amount in btc is the value\n" + " \"address\":amount (numeric) The myriad address is the key, the numeric amount in MYR 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 bitcoins than you enter in their corresponding amount field.\n" + " Those recipients will receive less myriad 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" @@ -945,13 +945,13 @@ Value sendmany(const Array& params, bool fHelp) " the number of addresses.\n" "\nExamples:\n" "\nSend two amounts to two different addresses:\n" - + HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") + + + HelpExampleCli("sendmany", "\"\" \"{\\\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\\\":0.01,\\\"MFGBGKCBXvTsnEk4Bf8buY3AvF8qMDGZuR\\\":0.02}\"") + "\nSend two amounts to two different addresses setting the confirmation and comment:\n" - + HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"") + + + HelpExampleCli("sendmany", "\"\" \"{\\\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\\\":0.01,\\\"MFGBGKCBXvTsnEk4Bf8buY3AvF8qMDGZuR\\\":0.02}\" 6 \"testing\"") + "\nSend two amounts to two different addresses, subtract fee from amount:\n" - + HelpExampleCli("sendmany", "\"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\",\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"") + + + HelpExampleCli("sendmany", "\"\" \"{\\\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\\\":0.01,\\\"MFGBGKCBXvTsnEk4Bf8buY3AvF8qMDGZuR\\\":0.02}\" 1 \"\" \"[\\\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\\\",\\\"MFGBGKCBXvTsnEk4Bf8buY3AvF8qMDGZuR\\\"]\"") + "\nAs a json rpc call\n" - + HelpExampleRpc("sendmany", "\"\", \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"") + + HelpExampleRpc("sendmany", "\"\", \"{\\\"MJPyMHUJiQpwM5ZkzKXDo5UPYTNh5yJ9Vf\\\":0.01,\\\"MFGBGKCBXvTsnEk4Bf8buY3AvF8qMDGZuR\\\":0.02}\", 6, \"testing\"") ); LOCK2(cs_main, pwalletMain->cs_wallet); @@ -979,7 +979,7 @@ Value sendmany(const Array& params, bool fHelp) { CBitcoinAddress address(s.name_); 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 Myriad address: ")+s.name_); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); @@ -1031,20 +1031,20 @@ Value addmultisigaddress(const Array& 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 Bitcoin address or hex-encoded public key.\n" + "Each key is a Myriad 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 bitcoin addresses or hex-encoded public keys\n" + "2. \"keysobject\" (string, required) A json array of myriad addresses or hex-encoded public keys\n" " [\n" - " \"address\" (string) bitcoin address or hex-encoded public key\n" + " \"address\" (string) myriad address or hex-encoded public key\n" " ...,\n" " ]\n" "3. \"account\" (string, optional) DEPRECATED. An account to assign the addresses to.\n" "\nResult:\n" - "\"bitcoinaddress\" (string) A bitcoin address associated with the keys.\n" + "\"myriadaddress\" (string) A myriad address associated with the keys.\n" "\nExamples:\n" "\nAdd a multisig address from 2 addresses\n" @@ -1223,7 +1223,7 @@ Value listreceivedbyaddress(const Array& 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 MYR received by the address\n" " \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n" " }\n" " ,...\n" @@ -1389,17 +1389,17 @@ Value listtransactions(const Array& 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\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for \n" + " \"address\":\"myriadaddress\", (string) The myriad 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 MYR. 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 MYR. 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" @@ -1581,12 +1581,12 @@ Value listsinceblock(const Array& 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\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).\n" + " \"address\":\"myriadaddress\", (string) The myriad 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 MYR. 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 MYR. 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" @@ -1669,7 +1669,7 @@ Value gettransaction(const Array& 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 MYR\n" " \"confirmations\" : n, (numeric) The number of confirmations\n" " \"blockhash\" : \"hash\", (string) The block hash\n" " \"blockindex\" : xx, (numeric) The block index\n" @@ -1680,9 +1680,9 @@ Value gettransaction(const Array& 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\" : \"bitcoinaddress\", (string) The bitcoin address involved in the transaction\n" + " \"address\" : \"myriadaddress\", (string) The myriad 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 MYR\n" " \"vout\" : n, (numeric) the vout value\n" " }\n" " ,...\n" @@ -1812,7 +1812,7 @@ Value walletpassphrase(const Array& 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 bitcoins\n" + "This is needed prior to performing transactions related to private keys such as sending myriad\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" @@ -1967,10 +1967,10 @@ Value encryptwallet(const Array& 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 bitcoin\n" + "\nNow set the passphrase to use the wallet, such as for signing or sending myriad\n" + HelpExampleCli("walletpassphrase", "\"my pass phrase\"") + "\nNow we can so something like sign\n" - + HelpExampleCli("signmessage", "\"bitcoinaddress\" \"test message\"") + + + HelpExampleCli("signmessage", "\"myriadaddress\" \"test message\"") + "\nNow lock the wallet again by removing the passphrase\n" + HelpExampleCli("walletlock", "") + "\nAs a json rpc call\n" @@ -2002,7 +2002,7 @@ Value encryptwallet(const Array& params, bool fHelp) // slack space in .dat files; that is bad if the old data is // unencrypted private keys. So: 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; Myriad 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) @@ -2015,7 +2015,7 @@ Value lockunspent(const Array& 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 bitcoins.\n" + "A locked transaction output will not be chosen by automatic coin selection, when spending myriad.\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" @@ -2179,8 +2179,8 @@ Value getwalletinfo(const Array& params, bool fHelp) "\nResult:\n" "{\n" " \"walletversion\": xxxxx, (numeric) the wallet version\n" - " \"balance\": xxxxxxx, (numeric) the total confirmed bitcoin balance of the wallet\n" - " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed bitcoin balance of the wallet\n" + " \"balance\": xxxxxxx, (numeric) the total confirmed myriad balance of the wallet\n" + " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed myriad 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" @@ -2248,9 +2248,9 @@ Value listunspent(const Array& 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 bitcoin addresses to filter\n" + "3. \"addresses\" (string) A json array of myriad addresses to filter\n" " [\n" - " \"address\" (string) bitcoin address\n" + " \"address\" (string) myriad address\n" " ,...\n" " ]\n" "\nResult\n" @@ -2258,10 +2258,10 @@ Value listunspent(const Array& params, bool fHelp) " {\n" " \"txid\" : \"txid\", (string) the transaction id \n" " \"vout\" : n, (numeric) the vout value\n" - " \"address\" : \"address\", (string) the bitcoin address\n" + " \"address\" : \"address\", (string) the myriad 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 MYR\n" " \"confirmations\" : n (numeric) The number of confirmations\n" " }\n" " ,...\n" @@ -2289,7 +2289,7 @@ Value listunspent(const Array& params, bool fHelp) BOOST_FOREACH(Value& input, inputs) { CBitcoinAddress address(input.get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+input.get_str()); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Myriad address: ")+input.get_str()); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str()); setAddress.insert(address);