19 #include "validation.h" 26 #include <boost/assign/list_of.hpp> 38 ?
"\nRequires wallet passphrase to be set with walletpassphrase call." 86 std::string rbfStatus =
"no";
93 rbfStatus =
"unknown";
107 string strAccount = value.
get_str();
108 if (strAccount ==
"*")
118 if (fHelp || params.
size() > 1)
120 "getnewaddress ( \"account\" )\n" 121 "\nReturns a new Dash address for receiving payments.\n" 122 "If 'account' is specified (DEPRECATED), it is added to the address book \n" 123 "so payments received with the address will be credited to 'account'.\n" 125 "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" 127 "\"dashaddress\" (string) The new dash address\n" 137 if (params.
size() > 0)
162 bool bKeyUsed =
false;
197 if (fHelp || params.
size() != 1)
199 "getaccountaddress \"account\"\n" 200 "\nDEPRECATED. Returns the current Dash address for receiving payments to this account.\n" 202 "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" 204 "\"dashaddress\" (string) The account dash address\n" 229 if (fHelp || params.
size() > 1)
231 "getrawchangeaddress\n" 232 "\nReturns a new Dash address, for receiving change.\n" 233 "This is for use with raw transactions, NOT normal use.\n" 235 "\"address\" (string) The address\n" 264 if (fHelp || params.
size() < 1 || params.
size() > 2)
266 "setaccount \"dashaddress\" \"account\"\n" 267 "\nDEPRECATED. Sets the account associated with the given address.\n" 269 "1. \"dashaddress\" (string, required) The dash address to be associated with an account.\n" 270 "2. \"account\" (string, required) The account to assign the address to.\n" 272 +
HelpExampleCli(
"setaccount",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"tabby\"")
273 +
HelpExampleRpc(
"setaccount",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", \"tabby\"")
283 if (params.
size() > 1)
310 if (fHelp || params.
size() != 1)
312 "getaccount \"dashaddress\"\n" 313 "\nDEPRECATED. Returns the account associated with the given address.\n" 315 "1. \"dashaddress\" (string, required) The dash address for account lookup.\n" 317 "\"accountname\" (string) the account address\n" 319 +
HelpExampleCli(
"getaccount",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"")
320 +
HelpExampleRpc(
"getaccount",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"")
332 strAccount = (*mi).second.name;
342 if (fHelp || params.
size() != 1)
344 "getaddressesbyaccount \"account\"\n" 345 "\nDEPRECATED. Returns the list of addresses for the given account.\n" 347 "1. \"account\" (string, required) The account name.\n" 349 "[ (json array of string)\n" 350 " \"dashaddress\" (string) a dash address associated with the given account\n" 367 const string& strName = item.second.
name;
368 if (strName == strAccount)
382 if (nValue > curBalance)
394 std::string strError;
395 vector<CRecipient> vecSend;
396 int nChangePosRet = -1;
397 CRecipient recipient = {scriptPubKey, nValue, fSubtractFeeFromAmount};
402 strError =
strprintf(
"Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!",
FormatMoney(nFeeRequired));
406 throw JSONRPCError(
RPC_WALLET_ERROR,
"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
414 if (fHelp || params.
size() < 2 || params.
size() > 7)
416 "sendtoaddress \"dashaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount use_is use_ps )\n" 417 "\nSend an amount to a given address.\n" 420 "1. \"dashaddress\" (string, required) The dash address to send to.\n" 421 "2. \"amount\" (numeric or string, required) The amount in " +
CURRENCY_UNIT +
" to send. eg 0.1\n" 422 "3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n" 423 " This is not part of the transaction, just kept in your wallet.\n" 424 "4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n" 425 " to which you're sending the transaction. This is not part of the \n" 426 " transaction, just kept in your wallet.\n" 427 "5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n" 428 " The recipient will receive less amount of Dash than you enter in the amount field.\n" 429 "6. \"use_is\" (bool, optional) Send this transaction as InstantSend (default: false)\n" 430 "7. \"use_ps\" (bool, optional) Use anonymized funds only (default: false)\n" 432 "\"transactionid\" (string) The transaction id.\n" 434 +
HelpExampleCli(
"sendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1")
435 +
HelpExampleCli(
"sendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1 \"donation\" \"seans outpost\"")
436 +
HelpExampleCli(
"sendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1 \"\" \"\" true")
437 +
HelpExampleRpc(
"sendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", 0.1, \"donation\", \"seans outpost\"")
458 bool fSubtractFeeFromAmount =
false;
459 if (params.
size() > 4)
460 fSubtractFeeFromAmount = params[4].get_bool();
462 bool fUseInstantSend =
false;
463 bool fUsePrivateSend =
false;
464 if (params.
size() > 5)
465 fUseInstantSend = params[5].get_bool();
466 if (params.
size() > 6)
467 fUsePrivateSend = params[6].get_bool();
471 SendMoney(address.
Get(), nAmount, fSubtractFeeFromAmount, wtx, fUseInstantSend, fUsePrivateSend);
473 return wtx.GetHash().GetHex();
481 if (fHelp || params.
size() < 2 || params.
size() > 5)
483 "instantsendtoaddress \"dashaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n" 484 "\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n" 487 "1. \"dashaddress\" (string, required) The dash address to send to.\n" 488 "2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n" 489 "3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n" 490 " This is not part of the transaction, just kept in your wallet.\n" 491 "4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n" 492 " to which you're sending the transaction. This is not part of the \n" 493 " transaction, just kept in your wallet.\n" 494 "5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n" 495 " The recipient will receive less amount of Dash than you enter in the amount field.\n" 497 "\"transactionid\" (string) The transaction id.\n" 499 +
HelpExampleCli(
"instantsendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1")
500 +
HelpExampleCli(
"instantsendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1 \"donation\" \"seans outpost\"")
501 +
HelpExampleCli(
"instantsendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1 \"\" \"\" true")
502 +
HelpExampleRpc(
"instantsendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", 0.1, \"donation\", \"seans outpost\"")
523 bool fSubtractFeeFromAmount =
false;
524 if (params.
size() > 4)
525 fSubtractFeeFromAmount = params[4].get_bool();
529 SendMoney(address.
Get(), nAmount, fSubtractFeeFromAmount, wtx,
true);
531 return wtx.GetHash().GetHex();
541 "listaddressgroupings\n" 542 "\nLists groups of addresses which have had their common ownership\n" 543 "made public by common use as inputs or as the resulting change\n" 544 "in past transactions\n" 549 " \"dashaddress\", (string) The dash address\n" 551 " \"account\" (string, optional) The account (DEPRECATED)\n" 582 return jsonGroupings;
590 if (fHelp || params.
size() != 2)
592 "signmessage \"dashaddress\" \"message\"\n" 593 "\nSign a message with the private key of an address" 596 "1. \"dashaddress\" (string, required) The dash address to use for the private key.\n" 597 "2. \"message\" (string, required) The message to create a signature of.\n" 599 "\"signature\" (string) The signature of the message encoded in base 64\n" 601 "\nUnlock the wallet for 30 seconds\n" 603 "\nCreate the signature\n" 604 +
HelpExampleCli(
"signmessage",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"my message\"") +
605 "\nVerify the signature\n" 606 +
HelpExampleCli(
"verifymessage",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" \"signature\" \"my message\"") +
608 +
HelpExampleRpc(
"signmessage",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", \"my message\"")
615 string strAddress = params[0].
get_str();
616 string strMessage = params[1].
get_str();
634 vector<unsigned char> vchSig;
646 if (fHelp || params.
size() < 1 || params.
size() > 3)
648 "getreceivedbyaddress \"dashaddress\" ( minconf addlockconf )\n" 649 "\nReturns the total amount received by the given dashaddress in transactions with specified minimum number of confirmations.\n" 651 "1. \"dashaddress\" (string, required) The dash address for transactions.\n" 652 "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n" 653 "3. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 655 "amount (numeric) The total amount in " +
CURRENCY_UNIT +
" received at this address.\n" 657 "\nThe amount from transactions with at least 1 confirmation\n" 658 +
HelpExampleCli(
"getreceivedbyaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"") +
659 "\nThe amount including unconfirmed transactions, zero confirmations\n" 660 +
HelpExampleCli(
"getreceivedbyaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0") +
661 "\nThe amount with at least 6 confirmation, very safe\n" 662 +
HelpExampleCli(
"getreceivedbyaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 6") +
663 "\nAs a json rpc call\n" 664 +
HelpExampleRpc(
"getreceivedbyaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", 6")
679 if (params.
size() > 1)
680 nMinDepth = params[1].get_int();
681 bool fAddLockConf = (params.
size() > 2 && params[2].
get_bool());
706 if (fHelp || params.
size() < 1 || params.
size() > 3)
708 "getreceivedbyaccount \"account\" ( minconf addlockconf )\n" 709 "\nDEPRECATED. Returns the total amount received by addresses with <account> in transactions with specified minimum number of confirmations.\n" 711 "1. \"account\" (string, required) The selected account, may be the default account using \"\".\n" 712 "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n" 713 "3. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 715 "amount (numeric) The total amount in " +
CURRENCY_UNIT +
" received for this account.\n" 717 "\nAmount received by the default account with at least 1 confirmation\n" 719 "\nAmount received at the tabby account including unconfirmed amounts with zero confirmations\n" 721 "\nThe amount with at least 6 confirmation, very safe\n" 723 "\nAs a json rpc call\n" 731 if (params.
size() > 1)
732 nMinDepth = params[1].get_int();
733 bool fAddLockConf = (params.
size() > 2 && params[2].
get_bool());
771 CAmount nReceived, nSent, nFee;
775 nBalance += nReceived;
776 nBalance -= nSent + nFee;
797 if (fHelp || params.
size() > 4)
799 "getbalance ( \"account\" minconf addlockconf includeWatchonly )\n" 800 "\nIf account is not specified, returns the server's total available balance.\n" 801 "If account is specified (DEPRECATED), returns the balance in the account.\n" 802 "Note that the account \"\" is not the same as leaving the parameter out.\n" 803 "The server total may be different to the balance in the default \"\" account.\n" 805 "1. \"account\" (string, optional) DEPRECATED. The selected account, or \"*\" for entire wallet. It may be the default account using \"\".\n" 806 "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n" 807 "3. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 808 "4. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n" 810 "amount (numeric) The total amount in " +
CURRENCY_UNIT +
" received for this account.\n" 812 "\nThe total amount in the wallet\n" 814 "\nThe total amount in the wallet at least 5 blocks confirmed\n" 816 "\nAs a json rpc call\n" 822 if (params.
size() == 0)
826 if (params.
size() > 1)
827 nMinDepth = params[1].get_int();
828 bool fAddLockConf = (params.
size() > 2 && params[2].
get_bool());
830 if(params.
size() > 3)
831 if(params[3].get_bool())
834 if (params[0].get_str() ==
"*") {
846 string strSentAccount;
847 list<COutputEntry> listReceived;
848 list<COutputEntry> listSent;
849 wtx.
GetAmounts(listReceived, listSent, allFee, strSentAccount, filter);
874 if (fHelp || params.
size() > 0)
876 "getunconfirmedbalance\n" 877 "Returns the server's total unconfirmed balance\n");
890 if (fHelp || params.
size() < 3 || params.
size() > 5)
892 "move \"fromaccount\" \"toaccount\" amount ( minconf \"comment\" )\n" 893 "\nDEPRECATED. Move a specified amount from one account in your wallet to another.\n" 895 "1. \"fromaccount\" (string, required) The name of the account to move funds from. May be the default account using \"\".\n" 896 "2. \"toaccount\" (string, required) The name of the account to move funds to. May be the default account using \"\".\n" 897 "3. amount (numeric) Quantity of " +
CURRENCY_UNIT +
" to move between accounts.\n" 898 "4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n" 899 "5. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n" 901 "true|false (boolean) true if successful.\n" 903 "\nMove 0.01 " +
CURRENCY_UNIT +
" from the default account to the account named tabby\n" 905 "\nMove 0.01 " +
CURRENCY_UNIT +
" timotei to akiko with a comment and funds have 6 confirmations\n" 906 +
HelpExampleCli(
"move",
"\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") +
907 "\nAs a json rpc call\n" 908 +
HelpExampleRpc(
"move",
"\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
918 if (params.
size() > 3)
922 if (params.
size() > 4)
923 strComment = params[4].get_str();
963 if (fHelp || params.
size() < 3 || params.
size() > 7)
965 "sendfrom \"fromaccount\" \"todashaddress\" amount ( minconf addlockconf \"comment\" \"comment-to\" )\n" 966 "\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a dash address." 969 "1. \"fromaccount\" (string, required) The name of the account to send funds from. May be the default account using \"\".\n" 970 "2. \"todashaddress\" (string, required) The dash address to send funds to.\n" 971 "3. amount (numeric or string, required) The amount in " +
CURRENCY_UNIT +
" (transaction fee is added on top).\n" 972 "4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n" 973 "5. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 974 "6. \"comment\" (string, optional) A comment used to store what the transaction is for. \n" 975 " This is not part of the transaction, just kept in your wallet.\n" 976 "7. \"comment-to\" (string, optional) An optional comment to store the name of the person or organization \n" 977 " to which you're sending the transaction. This is not part of the transaction, \n" 978 " it is just kept in your wallet.\n" 980 "\"transactionid\" (string) The transaction id.\n" 982 "\nSend 0.01 " +
CURRENCY_UNIT +
" from the default account to the address, must have at least 1 confirmation\n" 983 +
HelpExampleCli(
"sendfrom",
"\"\" \"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.01") +
984 "\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n" 985 +
HelpExampleCli(
"sendfrom",
"\"tabby\" \"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.01 6 false \"donation\" \"seans outpost\"") +
986 "\nAs a json rpc call\n" 987 +
HelpExampleRpc(
"sendfrom",
"\"tabby\", \"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", 0.01, 6, false, \"donation\", \"seans outpost\"")
1000 if (params.
size() > 3)
1001 nMinDepth = params[3].get_int();
1002 bool fAddLockConf = (params.
size() > 4 && params[4].
get_bool());
1015 if (nAmount > nBalance)
1029 if (fHelp || params.
size() < 2 || params.
size() > 8)
1030 throw runtime_error(
1031 "sendmany \"fromaccount\" {\"address\":amount,...} ( minconf addlockconf \"comment\" [\"address\",...] subtractfeefromamount use_is use_ps )\n" 1032 "\nSend multiple times. Amounts are double-precision floating point numbers." 1035 "1. \"fromaccount\" (string, required) DEPRECATED. The account to send the funds from. Should be \"\" for the default account\n" 1036 "2. \"amounts\" (string, required) A json object with addresses and amounts\n" 1038 " \"address\":amount (numeric or string) The dash address is the key, the numeric amount (can be string) in " +
CURRENCY_UNIT +
" is the value\n" 1041 "3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n" 1042 "4. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 1043 "5. \"comment\" (string, optional) A comment\n" 1044 "6. subtractfeefromamount (string, optional) A json array with addresses.\n" 1045 " The fee will be equally deducted from the amount of each selected address.\n" 1046 " Those recipients will receive less dashs than you enter in their corresponding amount field.\n" 1047 " If no addresses are specified here, the sender pays the fee.\n" 1049 " \"address\" (string) Subtract fee from this address\n" 1052 "7. \"use_is\" (bool, optional) Send this transaction as InstantSend (default: false)\n" 1053 "8. \"use_ps\" (bool, optional) Use anonymized funds only (default: false)\n" 1055 "\"transactionid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n" 1056 " the number of addresses.\n" 1058 "\nSend two amounts to two different addresses:\n" 1059 +
HelpExampleCli(
"sendmany",
"\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\\\":0.02}\"") +
1060 "\nSend two amounts to two different addresses setting the confirmation and comment:\n" 1061 +
HelpExampleCli(
"sendmany",
"\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\\\":0.02}\" 6 false \"testing\"") +
1062 "\nAs a json rpc call\n" 1063 +
HelpExampleRpc(
"sendmany",
"\"tabby\", \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\":0.01,\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\\\":0.02}\", 6, false, \"testing\"")
1074 if (params.
size() > 2)
1075 nMinDepth = params[2].get_int();
1076 bool fAddLockConf = (params.
size() > 3 && params[3].
get_bool());
1084 if (params.
size() > 5)
1085 subtractFeeFromAmount = params[5].get_array();
1087 set<CBitcoinAddress> setAddress;
1088 vector<CRecipient> vecSend;
1091 vector<string> keys = sendTo.
getKeys();
1092 BOOST_FOREACH(
const string& name_, keys)
1098 if (setAddress.count(address))
1100 setAddress.insert(address);
1106 totalAmount += nAmount;
1108 bool fSubtractFeeFromAmount =
false;
1109 for (
unsigned int idx = 0; idx < subtractFeeFromAmount.
size(); idx++) {
1110 const UniValue& addr = subtractFeeFromAmount[idx];
1112 fSubtractFeeFromAmount =
true;
1115 CRecipient recipient = {scriptPubKey, nAmount, fSubtractFeeFromAmount};
1123 if (totalAmount > nBalance)
1129 int nChangePosRet = -1;
1130 string strFailReason;
1131 bool fUseInstantSend =
false;
1132 bool fUsePrivateSend =
false;
1133 if (params.
size() > 6)
1134 fUseInstantSend = params[6].get_bool();
1135 if (params.
size() > 7)
1136 fUsePrivateSend = params[7].get_bool();
1156 if (fHelp || params.
size() < 2 || params.
size() > 3)
1158 string msg =
"addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n" 1159 "\nAdd a nrequired-to-sign multisignature address to the wallet.\n" 1160 "Each key is a Dash address or hex-encoded public key.\n" 1161 "If 'account' is specified (DEPRECATED), assign address to that account.\n" 1164 "1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n" 1165 "2. \"keysobject\" (string, required) A json array of dash addresses or hex-encoded public keys\n" 1167 " \"address\" (string) dash address or hex-encoded public key\n" 1170 "3. \"account\" (string, optional) DEPRECATED. An account to assign the addresses to.\n" 1173 "\"dashaddress\" (string) A dash address associated with the keys.\n" 1176 "\nAdd a multisig address from 2 addresses\n" 1177 +
HelpExampleCli(
"addmultisigaddress",
"2 \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrs\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK1\\\"]\"") +
1178 "\nAs json rpc call\n" 1179 +
HelpExampleRpc(
"addmultisigaddress",
"2, \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrs\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK1\\\"]\"")
1181 throw runtime_error(
msg);
1187 if (params.
size() > 2)
1209 nConf = std::numeric_limits<int>::max();
1210 fIsWatchonly =
false;
1218 if (params.
size() > 0)
1219 nMinDepth = params[0].get_int();
1220 bool fAddLockConf = (params.
size() > 1 && params[1].
get_bool());
1223 bool fIncludeEmpty =
false;
1224 if (params.
size() > 2)
1225 fIncludeEmpty = params[2].get_bool();
1228 if(params.
size() > 3)
1229 if(params[3].get_bool())
1233 map<CBitcoinAddress, tallyitem> mapTally;
1242 if (nDepth < nMinDepth)
1252 if(!(mine & filter))
1266 map<string, tallyitem> mapAccountTally;
1270 const string& strAccount = item.second.
name;
1271 map<CBitcoinAddress, tallyitem>::iterator it = mapTally.find(address);
1272 if (it == mapTally.end() && !fIncludeEmpty)
1276 if(!(mine & filter))
1280 int nConf = std::numeric_limits<int>::max();
1281 bool fIsWatchonly =
false;
1282 if (it != mapTally.end())
1284 nAmount = (*it).second.nAmount;
1285 nConf = (*it).second.nConf;
1286 fIsWatchonly = (*it).second.fIsWatchonly;
1291 tallyitem& item = mapAccountTally[strAccount];
1304 obj.
push_back(
Pair(
"confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf)));
1308 if (it != mapTally.end())
1310 BOOST_FOREACH(
const uint256& item, (*it).second.txids)
1322 for (map<string, tallyitem>::iterator it = mapAccountTally.begin(); it != mapAccountTally.end(); ++it)
1324 CAmount nAmount = (*it).second.nAmount;
1325 int nConf = (*it).second.nConf;
1327 if((*it).second.fIsWatchonly)
1331 obj.
push_back(
Pair(
"confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf)));
1344 if (fHelp || params.
size() > 4)
1345 throw runtime_error(
1346 "listreceivedbyaddress ( minconf addlockconf includeempty includeWatchonly)\n" 1347 "\nList balances by receiving address.\n" 1349 "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n" 1350 "2. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 1351 "3. includeempty (bool, optional, default=false) Whether to include addresses that haven't received any payments.\n" 1352 "4. includeWatchonly (bool, optional, default=false) Whether to include watchonly addresses (see 'importaddress').\n" 1357 " \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n" 1358 " \"address\" : \"receivingaddress\", (string) The receiving address\n" 1359 " \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n" 1360 " \"amount\" : x.xxx, (numeric) The total amount in " +
CURRENCY_UNIT +
" received by the address\n" 1361 " \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included.\n" 1362 " If 'addlockconf' is true, the minimum number of confirmations is calculated\n" 1363 " including additional " + std::to_string(
nInstantSendDepth) +
" confirmations for transactions locked via InstantSend\n" 1364 " \"label\" : \"label\" (string) A comment for the address/transaction, if any\n" 1372 +
HelpExampleRpc(
"listreceivedbyaddress",
"6, false, true, true")
1385 if (fHelp || params.
size() > 4)
1386 throw runtime_error(
1387 "listreceivedbyaccount ( minconf addlockconf includeempty includeWatchonly)\n" 1388 "\nDEPRECATED. List balances by account.\n" 1390 "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n" 1391 "2. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 1392 "3. includeempty (bool, optional, default=false) Whether to include accounts that haven't received any payments.\n" 1393 "4. includeWatchonly (bool, optional, default=false) Whether to include watchonly addresses (see 'importaddress').\n" 1398 " \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n" 1399 " \"account\" : \"accountname\", (string) The account name of the receiving account\n" 1400 " \"amount\" : x.xxx, (numeric) The total amount received by addresses with this account\n" 1401 " \"confirmations\" : n (numeric) The number of blockchain confirmations of the most recent transaction included\n" 1402 " \"label\" : \"label\" (string) A comment for the address/transaction, if any\n" 1410 +
HelpExampleRpc(
"listreceivedbyaccount",
"6, false, true, true")
1428 string strSentAccount;
1429 list<COutputEntry> listReceived;
1430 list<COutputEntry> listSent;
1432 wtx.
GetAmounts(listReceived, listSent, nFee, strSentAccount, filter);
1434 bool fAllAccounts = (strAccount == string(
"*"));
1438 if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount))
1447 std::map<std::string, std::string>::const_iterator it = wtx.
mapValue.find(
"DS");
1448 entry.
push_back(
Pair(
"category", (it != wtx.
mapValue.end() && it->second ==
"1") ?
"privatesend" :
"send"));
1469 if (fAllAccounts || (account == strAccount))
1503 bool fAllAccounts = (strAccount == string(
"*"));
1505 if (fAllAccounts || acentry.
strAccount == strAccount)
1523 if (fHelp || params.
size() > 4)
1524 throw runtime_error(
1525 "listtransactions ( \"account\" count from includeWatchonly)\n" 1526 "\nReturns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.\n" 1528 "1. \"account\" (string, optional) DEPRECATED. The account name. Should be \"*\".\n" 1529 "2. count (numeric, optional, default=10) The number of transactions to return\n" 1530 "3. from (numeric, optional, default=0) The number of transactions to skip\n" 1531 "4. includeWatchonly (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')\n" 1535 " \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n" 1536 " It will be \"\" for the default account.\n" 1537 " \"address\":\"dashaddress\", (string) The dash address of the transaction. Not present for \n" 1538 " move transactions (category = move).\n" 1539 " \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n" 1540 " transaction between accounts, and not associated with an address,\n" 1541 " transaction id or block. 'send' and 'receive' transactions are \n" 1542 " associated with an address, transaction id and block details\n" 1543 " \"amount\": x.xxx, (numeric) The amount in " +
CURRENCY_UNIT +
". This is negative for the 'send' category, and for the\n" 1544 " 'move' category for moves outbound. It is positive for the 'receive' category,\n" 1545 " and for the 'move' category for inbound funds.\n" 1546 " \"vout\": n, (numeric) the vout value\n" 1547 " \"fee\": x.xxx, (numeric) The amount of the fee in " +
CURRENCY_UNIT +
". This is negative and only available for the \n" 1548 " 'send' category of transactions.\n" 1549 " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions.\n" 1550 " \"confirmations\": n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and \n" 1551 " 'receive' category of transactions. Negative confirmations indicate the\n" 1552 " transation conflicts with the block chain\n" 1553 " \"trusted\": xxx (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.\n" 1554 " \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive'\n" 1555 " category of transactions.\n" 1556 " \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive'\n" 1557 " category of transactions.\n" 1558 " \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n" 1559 " \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n" 1560 " \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n" 1561 " \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n" 1562 " for 'send' and 'receive' category of transactions.\n" 1563 " \"comment\": \"...\", (string) If a comment is associated with the transaction.\n" 1564 " \"label\": \"label\" (string) A comment for the address/transaction, if any\n" 1565 " \"otheraccount\": \"accountname\", (string) For the 'move' category of transactions, the account the funds came \n" 1566 " from (for receiving funds, positive amounts), or went to (for sending funds,\n" 1567 " negative amounts).\n" 1568 " \"bip125-replaceable\": \"yes|no|unknown\" (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n" 1569 " may be unknown for unconfirmed transactions not in the mempool\n" 1574 "\nList the most recent 10 transactions in the systems\n" 1576 "\nList transactions 100 to 120\n" 1578 "\nAs a json rpc call\n" 1584 string strAccount =
"*";
1585 if (params.
size() > 0)
1586 strAccount = params[0].get_str();
1588 if (params.
size() > 1)
1589 nCount = params[1].get_int();
1591 if (params.
size() > 2)
1592 nFrom = params[2].get_int();
1594 if(params.
size() > 3)
1595 if(params[3].get_bool())
1608 for (CWallet::TxItems::const_reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
1610 CWalletTx *
const pwtx = (*it).second.first;
1617 if ((
int)ret.
size() >= (nCount+nFrom))
break;
1621 if (nFrom > (
int)ret.
size())
1623 if ((nFrom + nCount) > (
int)ret.
size())
1624 nCount = ret.
size() - nFrom;
1626 vector<UniValue> arrTmp = ret.
getValues();
1628 vector<UniValue>::iterator first = arrTmp.begin();
1629 std::advance(first, nFrom);
1630 vector<UniValue>::iterator last = arrTmp.begin();
1631 std::advance(last, nFrom+nCount);
1633 if (last != arrTmp.end()) arrTmp.erase(last, arrTmp.end());
1634 if (first != arrTmp.begin()) arrTmp.erase(arrTmp.begin(), first);
1636 std::reverse(arrTmp.begin(), arrTmp.end());
1650 if (fHelp || params.
size() > 3)
1651 throw runtime_error(
1652 "listaccounts ( minconf addlockconf includeWatchonly)\n" 1653 "\nDEPRECATED. Returns Object that has account names as keys, account balances as values.\n" 1655 "1. minconf (numeric, optional, default=1) Only include transactions with at least this many confirmations\n" 1656 "2. addlockconf (bool, optional, default=false) Whether to add " + std::to_string(
nInstantSendDepth) +
" confirmations to transactions locked via InstantSend.\n" 1657 "3. includeWatchonly (bool, optional, default=false) Include balances in watchonly addresses (see 'importaddress')\n" 1659 "{ (json object where keys are account names, and values are numeric balances\n" 1660 " \"account\": x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.\n" 1664 "\nList account balances where there at least 1 confirmation\n" 1666 "\nList account balances including zero confirmation transactions\n" 1668 "\nList account balances for 6 or more confirmations\n" 1670 "\nAs json rpc call\n" 1677 if (params.
size() > 0)
1678 nMinDepth = params[0].get_int();
1679 bool fAddLockConf = (params.
size() > 1 && params[1].
get_bool());
1681 if(params.
size() > 2)
1682 if(params[2].get_bool())
1685 map<string, CAmount> mapAccountBalances;
1688 mapAccountBalances[entry.second.
name] = 0;
1695 string strSentAccount;
1696 list<COutputEntry> listReceived;
1697 list<COutputEntry> listSent;
1701 wtx.
GetAmounts(listReceived, listSent, nFee, strSentAccount, includeWatchonly);
1702 mapAccountBalances[strSentAccount] -= nFee;
1704 mapAccountBalances[strSentAccount] -= s.
amount;
1705 if (nDepth >= nMinDepth)
1711 mapAccountBalances[
""] += r.
amount;
1720 BOOST_FOREACH(
const PAIRTYPE(
string,
CAmount)& accountBalance, mapAccountBalances) {
1732 throw runtime_error(
1733 "listsinceblock ( \"blockhash\" target-confirmations includeWatchonly)\n" 1734 "\nGet all transactions in blocks since block [blockhash], or all transactions if omitted\n" 1736 "1. \"blockhash\" (string, optional) The block hash to list transactions since\n" 1737 "2. target-confirmations: (numeric, optional) The confirmations required, must be 1 or more\n" 1738 "3. includeWatchonly: (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')" 1741 " \"transactions\": [\n" 1742 " \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n" 1743 " \"address\":\"dashaddress\", (string) The dash address of the transaction. Not present for move transactions (category = move).\n" 1744 " \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n" 1745 " \"amount\": x.xxx, (numeric) The amount in " +
CURRENCY_UNIT +
". This is negative for the 'send' category, and for the 'move' category for moves \n" 1746 " outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n" 1747 " \"vout\" : n, (numeric) the vout value\n" 1748 " \"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" 1749 " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions.\n" 1750 " \"confirmations\" : n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n" 1751 " \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n" 1752 " \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.\n" 1753 " \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n" 1754 " \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n" 1755 " \"time\": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n" 1756 " \"timereceived\": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n" 1757 " \"comment\": \"...\", (string) If a comment is associated with the transaction.\n" 1758 " \"label\" : \"label\" (string) A comment for the address/transaction, if any\n" 1759 " \"to\": \"...\", (string) If a comment to is associated with the transaction.\n" 1761 " \"lastblock\": \"lastblockhash\" (string) The hash of the last block\n" 1765 +
HelpExampleCli(
"listsinceblock",
"\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\" 6")
1766 +
HelpExampleRpc(
"listsinceblock",
"\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\", 6")
1772 int target_confirms = 1;
1775 if (params.
size() > 0)
1779 blockId.
SetHex(params[0].get_str());
1782 pindex = it->second;
1787 if (params.
size() > 1)
1789 target_confirms = params[1].
get_int();
1791 if (target_confirms < 1)
1795 if(params.
size() > 2)
1796 if(params[2].get_bool())
1826 if (fHelp || params.
size() < 1 || params.
size() > 2)
1827 throw runtime_error(
1828 "gettransaction \"txid\" ( includeWatchonly )\n" 1829 "\nGet detailed information about in-wallet transaction <txid>\n" 1831 "1. \"txid\" (string, required) The transaction id\n" 1832 "2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n" 1835 " \"amount\" : x.xxx, (numeric) The transaction amount in " +
CURRENCY_UNIT +
"\n" 1836 " \"instantlock\" : true|false, (bool) Current transaction lock state\n" 1837 " \"confirmations\" : n, (numeric) The number of blockchain confirmations\n" 1838 " \"blockhash\" : \"hash\", (string) The block hash\n" 1839 " \"blockindex\" : xx, (numeric) The index of the transaction in the block that includes it\n" 1840 " \"blocktime\" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)\n" 1841 " \"txid\" : \"transactionid\", (string) The transaction id.\n" 1842 " \"time\" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n" 1843 " \"timereceived\" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n" 1844 " \"bip125-replaceable\": \"yes|no|unknown\" (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n" 1845 " may be unknown for unconfirmed transactions not in the mempool\n" 1846 " \"details\" : [\n" 1848 " \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n" 1849 " \"address\" : \"dashaddress\", (string) The dash address involved in the transaction\n" 1850 " \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n" 1851 " \"amount\" : x.xxx, (numeric) The amount in " +
CURRENCY_UNIT +
"\n" 1852 " \"label\" : \"label\", (string) A comment for the address/transaction, if any\n" 1853 " \"vout\" : n, (numeric) the vout value\n" 1857 " \"hex\" : \"data\" (string) Raw data for transaction\n" 1861 +
HelpExampleCli(
"gettransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
1862 +
HelpExampleCli(
"gettransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\" true")
1863 +
HelpExampleRpc(
"gettransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
1869 hash.
SetHex(params[0].get_str());
1872 if(params.
size() > 1)
1873 if(params[1].get_bool())
1883 CAmount nNet = nCredit - nDebit;
1896 string strHex =
EncodeHexTx(static_cast<CTransaction>(wtx));
1907 if (fHelp || params.
size() != 1)
1908 throw runtime_error(
1909 "abandontransaction \"txid\"\n" 1910 "\nMark in-wallet transaction <txid> as abandoned\n" 1911 "This will mark this transaction and all its in-wallet descendants as abandoned which will allow\n" 1912 "for their inputs to be respent. It can be used to replace \"stuck\" or evicted transactions.\n" 1913 "It only works on transactions which are not included in a block and are not currently in the mempool.\n" 1914 "It has no effect on transactions which are already conflicted or abandoned.\n" 1916 "1. \"txid\" (string, required) The transaction id\n" 1919 +
HelpExampleCli(
"abandontransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
1920 +
HelpExampleRpc(
"abandontransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
1926 hash.
SetHex(params[0].get_str());
1942 if (fHelp || params.
size() != 1)
1943 throw runtime_error(
1944 "backupwallet \"destination\"\n" 1945 "\nSafely copies wallet.dat to destination, which can be a directory or a path with filename.\n" 1947 "1. \"destination\" (string) The destination directory or file\n" 1955 string strDest = params[0].
get_str();
1968 if (fHelp || params.
size() > 1)
1969 throw runtime_error(
1970 "keypoolrefill ( newsize )\n" 1971 "\nFills the keypool." 1983 unsigned int kpSize = 0;
1984 if (params.
size() > 0) {
1985 if (params[0].get_int() < 0)
1987 kpSize = (
unsigned int)params[0].get_int();
2013 throw runtime_error(
2014 "walletpassphrase \"passphrase\" timeout ( mixingonly )\n" 2015 "\nStores the wallet decryption key in memory for 'timeout' seconds.\n" 2016 "This is needed prior to performing transactions related to private keys such as sending dashs\n" 2018 "1. \"passphrase\" (string, required) The wallet passphrase\n" 2019 "2. timeout (numeric, required) The time to keep the decryption key in seconds.\n" 2020 "3. mixingonly (boolean, optional, default=false) If is true sending functions are disabled." 2022 "Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock\n" 2023 "time that overrides the old one.\n" 2025 "\nUnlock the wallet for 60 seconds\n" 2027 "\nUnlock the wallet for 60 seconds but allow PrivateSend mixing only\n" 2028 +
HelpExampleCli(
"walletpassphrase",
"\"my pass phrase\" 60 true") +
2029 "\nLock the wallet again (before 60 seconds)\n" 2031 "\nAs json rpc call\n" 2044 strWalletPass.reserve(100);
2047 strWalletPass = params[0].
get_str().c_str();
2049 int64_t nSleepTime = params[1].
get_int64();
2051 bool fForMixingOnly =
false;
2052 if (params.
size() >= 3)
2053 fForMixingOnly = params[2].get_bool();
2080 throw runtime_error(
2081 "walletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\n" 2082 "\nChanges the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.\n" 2084 "1. \"oldpassphrase\" (string) The current passphrase\n" 2085 "2. \"newpassphrase\" (string) The new passphrase\n" 2087 +
HelpExampleCli(
"walletpassphrasechange",
"\"old one\" \"new one\"")
2088 +
HelpExampleRpc(
"walletpassphrasechange",
"\"old one\", \"new one\"")
2101 strOldWalletPass.reserve(100);
2102 strOldWalletPass = params[0].
get_str().c_str();
2105 strNewWalletPass.reserve(100);
2106 strNewWalletPass = params[1].
get_str().c_str();
2108 if (strOldWalletPass.length() < 1 || strNewWalletPass.length() < 1)
2109 throw runtime_error(
2110 "walletpassphrasechange <oldpassphrase> <newpassphrase>\n" 2111 "Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>.");
2126 throw runtime_error(
2128 "\nRemoves the wallet encryption key from memory, locking the wallet.\n" 2129 "After calling this method, you will need to call walletpassphrase again\n" 2130 "before being able to call any methods which require the wallet to be unlocked.\n" 2132 "\nSet the passphrase for 2 minutes to perform a transaction\n" 2134 "\nPerform a send (requires passphrase set)\n" 2135 +
HelpExampleCli(
"sendtoaddress",
"\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 1.0") +
2136 "\nClear the passphrase since we are done before 2 minutes is up\n" 2138 "\nAs json rpc call\n" 2165 throw runtime_error(
2166 "encryptwallet \"passphrase\"\n" 2167 "\nEncrypts the wallet with 'passphrase'. This is for first time encryption.\n" 2168 "After this, any calls that interact with private keys such as sending or signing \n" 2169 "will require the passphrase to be set prior the making these calls.\n" 2170 "Use the walletpassphrase call for this, and then walletlock call.\n" 2171 "If the wallet is already encrypted, use the walletpassphrasechange call.\n" 2172 "Note that this will shutdown the server.\n" 2174 "1. \"passphrase\" (string) The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.\n" 2176 "\nEncrypt you wallet\n" 2178 "\nNow set the passphrase to use the wallet, such as for signing or sending dash\n" 2180 "\nNow we can so something like sign\n" 2181 +
HelpExampleCli(
"signmessage",
"\"dashaddress\" \"test message\"") +
2182 "\nNow lock the wallet again by removing the passphrase\n" 2184 "\nAs a json rpc call\n" 2198 strWalletPass.reserve(100);
2199 strWalletPass = params[0].
get_str().c_str();
2201 if (strWalletPass.length() < 1)
2202 throw runtime_error(
2203 "encryptwallet <passphrase>\n" 2204 "Encrypts the wallet with <passphrase>.");
2213 return "Wallet encrypted; Dash Core server stopping, restart to run with encrypted wallet. The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup.";
2221 if (fHelp || params.
size() < 1 || params.
size() > 2)
2222 throw runtime_error(
2223 "lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n" 2224 "\nUpdates list of temporarily unspendable outputs.\n" 2225 "Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n" 2226 "A locked transaction output will not be chosen by automatic coin selection, when spending dashs.\n" 2227 "Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n" 2228 "is always cleared (by virtue of process exit) when a node stops or fails.\n" 2229 "Also see the listunspent call\n" 2231 "1. unlock (boolean, required) Whether to unlock (true) or lock (false) the specified transactions\n" 2232 "2. \"transactions\" (string, required) A json array of objects. Each object the txid (string) vout (numeric)\n" 2233 " [ (json array of json objects)\n" 2235 " \"txid\":\"id\", (string) The transaction id\n" 2236 " \"vout\": n (numeric) The output number\n" 2242 "true|false (boolean) Whether the command was successful or not\n" 2245 "\nList the unspent transactions\n" 2247 "\nLock an unspent transaction\n" 2248 +
HelpExampleCli(
"lockunspent",
"false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2249 "\nList the locked transactions\n" 2251 "\nUnlock the transaction again\n" 2252 +
HelpExampleCli(
"lockunspent",
"true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2253 "\nAs a json rpc call\n" 2254 +
HelpExampleRpc(
"lockunspent",
"false, \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"")
2259 if (params.
size() == 1)
2264 bool fUnlock = params[0].
get_bool();
2266 if (params.
size() == 1) {
2273 for (
unsigned int idx = 0; idx < outputs.
size(); idx++) {
2274 const UniValue& output = outputs[idx];
2305 if (fHelp || params.
size() > 0)
2306 throw runtime_error(
2308 "\nReturns list of temporarily unspendable outputs.\n" 2309 "See the lockunspent call to lock and unlock transactions for spending.\n" 2313 " \"txid\" : \"transactionid\", (string) The transaction id locked\n" 2314 " \"vout\" : n (numeric) The vout value\n" 2319 "\nList the unspent transactions\n" 2321 "\nLock an unspent transaction\n" 2322 +
HelpExampleCli(
"lockunspent",
"false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2323 "\nList the locked transactions\n" 2325 "\nUnlock the transaction again\n" 2326 +
HelpExampleCli(
"lockunspent",
"true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2327 "\nAs a json rpc call\n" 2333 vector<COutPoint> vOutpts;
2338 BOOST_FOREACH(
COutPoint &outpt, vOutpts) {
2354 if (fHelp || params.
size() < 1 || params.
size() > 1)
2355 throw runtime_error(
2357 "\nSet the transaction fee per kB. Overwrites the paytxfee parameter.\n" 2359 "1. amount (numeric or sting, required) The transaction fee in " +
CURRENCY_UNIT +
"/kB\n" 2361 "true|false (boolean) Returns true if successful\n" 2381 if (fHelp || params.
size() != 0)
2382 throw runtime_error(
2384 "Returns an object containing various wallet state info.\n" 2387 " \"walletversion\": xxxxx, (numeric) the wallet version\n" 2388 " \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " +
CURRENCY_UNIT +
"\n" 2389 " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " +
CURRENCY_UNIT +
"\n" 2390 " \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " +
CURRENCY_UNIT +
"\n" 2391 " \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n" 2392 " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" 2393 " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)\n" 2394 " \"keypoolsize_hd_internal\": xxxx, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)\n" 2395 " \"keys_left\": xxxx, (numeric) how many new keys are left since last automatic backup\n" 2396 " \"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" 2397 " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " +
CURRENCY_UNIT +
"/kB\n" 2398 " \"hdchainid\": \"<hash>\", (string) the ID of the HD chain\n" 2399 " \"hdaccountcount\": xxx, (numeric) how many accounts of the HD chain are in this wallet\n" 2402 " \"hdaccountindex\": xxx, (numeric) the index of the account\n" 2403 " \"hdexternalkeyindex\": xxxx, (numeric) current external childkey index\n" 2404 " \"hdinternalkeyindex\": xxxx, (numeric) current internal childkey index\n" 2458 if (params.
size() >= 1)
2459 strCommand = params[0].get_str();
2462 (strCommand !=
"genkey" && strCommand !=
"init" && strCommand !=
"setpassphrase"))
2463 throw runtime_error(
2464 "keepass <genkey|init|setpassphrase>\n");
2466 if (strCommand ==
"genkey")
2471 sResult =
"Generated Key: ";
2473 return sResult.c_str();
2475 else if(strCommand ==
"init")
2482 sResult =
"Association successful. Id: ";
2483 sResult += strId.c_str();
2484 sResult +=
" - Key: ";
2485 sResult += sKey.c_str();
2486 return sResult.c_str();
2488 else if(strCommand ==
"setpassphrase")
2490 if(params.
size() != 2) {
2491 return "setlogin: invalid number of parameters. Requires a passphrase";
2498 return "setlogin: Updated credentials.";
2501 return "Invalid command";
2510 if (fHelp || params.
size() != 0)
2511 throw runtime_error(
2512 "resendwallettransactions\n" 2513 "Immediately re-broadcast unconfirmed wallet transactions to all peers.\n" 2514 "Intended only for testing; the wallet code periodically re-broadcasts\n" 2516 "Returns array of transaction ids that were re-broadcast.\n" 2526 BOOST_FOREACH(
const uint256& txid, txids)
2538 if (fHelp || params.
size() > 3)
2539 throw runtime_error(
2540 "listunspent ( minconf maxconf [\"address\",...] )\n" 2541 "\nReturns array of unspent transaction outputs\n" 2542 "with between minconf and maxconf (inclusive) confirmations.\n" 2543 "Optionally filter to only include txouts paid to specified addresses.\n" 2544 "Results are an array of Objects, each of which has:\n" 2545 "{txid, vout, scriptPubKey, amount, confirmations}\n" 2547 "1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n" 2548 "2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n" 2549 "3. \"addresses\" (string) A json array of dash addresses to filter\n" 2551 " \"address\" (string) dash address\n" 2555 "[ (array of json object)\n" 2557 " \"txid\" : \"txid\", (string) the transaction id \n" 2558 " \"vout\" : n, (numeric) the vout value\n" 2559 " \"address\" : \"address\", (string) the dash address\n" 2560 " \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n" 2561 " \"scriptPubKey\" : \"key\", (string) the script key\n" 2562 " \"amount\" : x.xxx, (numeric) the transaction amount in " +
CURRENCY_UNIT +
"\n" 2563 " \"confirmations\" : n (numeric) The number of confirmations\n" 2564 " \"ps_rounds\" : n (numeric) The number of PS round\n" 2565 " \"spendable\" : xxx, (bool) Whether we have the private keys to spend this output\n" 2566 " \"solvable\" : xxx (bool) Whether we know how to spend this output, ignoring the lack of keys\n" 2573 +
HelpExampleCli(
"listunspent",
"6 9999999 \"[\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\",\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\\\"]\"")
2574 +
HelpExampleRpc(
"listunspent",
"6, 9999999 \"[\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\",\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\\\"]\"")
2580 if (params.
size() > 0)
2581 nMinDepth = params[0].get_int();
2583 int nMaxDepth = 9999999;
2584 if (params.
size() > 1)
2585 nMaxDepth = params[1].get_int();
2587 set<CBitcoinAddress> setAddress;
2588 if (params.
size() > 2) {
2590 for (
unsigned int idx = 0; idx < inputs.
size(); idx++) {
2591 const UniValue& input = inputs[idx];
2593 if (!address.IsValid())
2595 if (setAddress.count(address))
2597 setAddress.insert(address);
2602 vector<COutput> vecOutputs;
2606 BOOST_FOREACH(
const COutput&
out, vecOutputs) {
2607 if (
out.nDepth < nMinDepth ||
out.nDepth > nMaxDepth)
2610 if (setAddress.size()) {
2615 if (!setAddress.count(address))
2634 const CScriptID& hash = boost::get<CScriptID>(address);
2656 if (fHelp || params.
size() < 1 || params.
size() > 2)
2657 throw runtime_error(
2658 "fundrawtransaction \"hexstring\" includeWatching\n" 2659 "\nAdd inputs to a transaction until it has enough in value to meet its out value.\n" 2660 "This will not modify existing inputs, and will add one change output to the outputs.\n" 2661 "Note that inputs which were signed may need to be resigned after completion since in/outputs have been added.\n" 2662 "The inputs added will not be signed, use signrawtransaction for that.\n" 2663 "Note that all existing inputs must have their previous output transaction be in the wallet.\n" 2664 "Note that all inputs selected must be of standard form and P2SH scripts must be" 2665 "in the wallet using importaddress or addmultisigaddress (to calculate fees).\n" 2666 "You can see whether this is the case by checking the \"solvable\" field in the listunspent output.\n" 2667 "Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only\n" 2669 "1. \"hexstring\" (string, required) The hex string of the raw transaction\n" 2670 "2. includeWatching (boolean, optional, default false) Also select inputs which are watch only\n" 2673 " \"hex\": \"value\", (string) The resulting raw transaction (hex-encoded string)\n" 2674 " \"fee\": n, (numeric) Fee the resulting transaction pays\n" 2675 " \"changepos\": n (numeric) The position of the added change output, or -1\n" 2679 "\nCreate a transaction with no inputs\n" 2680 +
HelpExampleCli(
"createrawtransaction",
"\"[]\" \"{\\\"myaddress\\\":0.01}\"") +
2681 "\nAdd sufficient unsigned inputs to meet the output value\n" 2682 +
HelpExampleCli(
"fundrawtransaction",
"\"rawtransactionhex\"") +
2683 "\nSign the transaction\n" 2684 +
HelpExampleCli(
"signrawtransaction",
"\"fundedtransactionhex\"") +
2685 "\nSend the transaction\n" 2686 +
HelpExampleCli(
"sendrawtransaction",
"\"signedtransactionhex\"")
2696 if (origTx.
vout.size() == 0)
2699 bool includeWatching =
false;
2700 if (params.
size() > 1)
2701 includeWatching = params[1].get_bool();
2705 string strFailReason;
2706 int nChangePos = -1;
2712 result.push_back(
Pair(
"changepos", nChangePos));
UniValue movecmd(const UniValue ¶ms, bool fHelp)
CAmount GetCredit(const isminefilter &filter) const
static CCriticalSection cs_nWalletUnlockTime
virtual bool GetCScript(const CScriptID &hash, CScript &redeemScriptOut) const
UniValue fundrawtransaction(const UniValue ¶ms, bool fHelp)
UniValue getnewaddress(const UniValue ¶ms, bool fHelp)
unsigned int GetKeyPoolSize()
bool EnsureWalletIsAvailable(bool avoidException)
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
UniValue getunconfirmedbalance(const UniValue ¶ms, bool fHelp)
CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false)
bool push_backV(const std::vector< UniValue > &vec)
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
UniValue walletpassphrasechange(const UniValue ¶ms, bool fHelp)
std::set< CTxDestination > GetAccountAddresses(const std::string &strAccount) const
Keypool ran out, call keypoolrefill first.
bool AddAccountingEntry(const CAccountingEntry &, CWalletDB &pwalletdb)
std::string strOtherAccount
bool SetAddressBook(const CTxDestination &address, const std::string &strName, const std::string &purpose)
UniValue keepass(const UniValue ¶ms, bool fHelp)
UniValue walletlock(const UniValue ¶ms, bool fHelp)
Failed to encrypt the wallet.
string AccountFromValue(const UniValue &value)
bool IsFromMe(const isminefilter &filter) const
CCriticalSection cs_wallet
const std::string CURRENCY_UNIT
CAmount GetUnconfirmedBalance() const
int64_t IncOrderPosNext(CWalletDB *pwalletdb=NULL)
UniValue getaccountaddress(const UniValue ¶ms, bool fHelp)
std::multimap< int64_t, TxPair > TxItems
bool AbandonTransaction(const uint256 &hashTx)
isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
UniValue getreceivedbyaddress(const UniValue ¶ms, bool fHelp)
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
bool Unlock(const SecureString &strWalletPassphrase, bool fForMixingOnly=false)
UniValue getwalletinfo(const UniValue ¶ms, bool fHelp)
UniValue listsinceblock(const UniValue ¶ms, bool fHelp)
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
uint32_t nInternalChainCounter
bool GetBroadcastTransactions() const
bool IsHex(const string &str)
std::set< uint256 > GetConflicts() const
CAmount GetValueOut() const
UniValue resendwallettransactions(const UniValue ¶ms, bool fHelp)
bool CommitTransaction(CWalletTx &wtxNew, CReserveKey &reservekey, CConnman *connman, std::string strCommand="tx")
indexed_transaction_set mapTx
bool BackupWallet(const CWallet &wallet, const string &strDest)
bool TopUpKeyPool(unsigned int kpSize=0)
static const unsigned int DEFAULT_KEYPOOL_SIZE
CScript _createmultisig_redeemScript(const UniValue ¶ms)
bool push_back(const UniValue &val)
UniValue listtransactions(const UniValue ¶ms, bool fHelp)
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
std::map< uint256, CWalletTx > mapWallet
UniValue ValueFromAmount(const CAmount &amount)
void EnsureWalletIsUnlocked()
const std::string strWalletFile
Ran out of memory during operation.
unsigned int nTimeReceived
const UniValue & find_value(const UniValue &obj, const std::string &name)
std::string ToString() const
string EncodeBase64(const unsigned char *pch, size_t len)
bool AddCScript(const CScript &redeemScript)
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.
int64_t get_int64() const
bool GetKey(const CKeyID &address, CKey &keyOut) const
GetKey implementation that can derive a HD private key on the fly.
bool GetAccount(uint32_t nAccountIndex, CHDAccount &hdAccountRet)
void WalletTxToJSON(const CWalletTx &wtx, UniValue &entry)
UniValue listlockunspent(const UniValue ¶ms, bool fHelp)
int GetVersion()
get the current wallet format (the oldest client version guaranteed to understand this wallet) ...
bool exists(uint256 hash) const
bool GetHDChain(CHDChain &hdChainRet) const
Enter the wallet passphrase with walletpassphrase first.
CAmount GetBalance() const
void push_back(const T &value)
UniValue getreceivedbyaccount(const UniValue ¶ms, bool fHelp)
const UniValue & get_obj() const
size_t KeypoolCountInternalKeys()
bool GetKeyFromPool(CPubKey &key, bool fInternal)
bool CreateTransaction(const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosRet, std::string &strFailReason, const CCoinControl *coinControl=NULL, bool sign=true, AvailableCoinsType nCoinType=ALL_COINS, bool fUseInstantSend=false)
bool CheckFinalTx(const CTransaction &tx, int flags)
int64_t GetOldestKeyPoolTime()
UniValue listaccounts(const UniValue ¶ms, bool fHelp)
bool ReadAccount(const std::string &strAccount, CAccount &account)
std::list< CAccountingEntry > laccentries
std::vector< std::string > getKeys() const
void UnlockCoin(COutPoint &output)
void RPCRunLater(const std::string &name, boost::function< void(void)> func, int64_t nSeconds)
UniValue listunspent(const UniValue ¶ms, bool fHelp)
int64_t GetTxTime() const
bool Set(const CKeyID &id)
uint256 uint256S(const char *str)
UniValue signmessage(const UniValue ¶ms, bool fHelp)
CAmount GetFeePerK() const
uint32_t nExternalChainCounter
Server is in safe mode, and command is not allowed in safe mode.
The wallet passphrase entered was incorrect.
bool IsRBFOptIn(const CTxMemPoolEntry &entry, CTxMemPool &pool)
std::vector< uint256 > ResendWalletTransactionsBefore(int64_t nTime, CConnman *connman)
UniValue listaddressgroupings(const UniValue ¶ms, bool fHelp)
bool IsLocked(bool fForMixing=false) const
UniValue setaccount(const UniValue ¶ms, bool fHelp)
General application defined errors.
CAmount GetDebit(const isminefilter &filter) const
filter decides which addresses will count towards the debit
bool IsLockedInstantSendTransaction(const uint256 &txHash)
bool IsPayToScriptHash() const
void ListTransactions(const CWalletTx &wtx, const string &strAccount, int nMinDepth, bool fLong, UniValue &ret, const isminefilter &filter)
std::string ToString() const
Unexpected type was passed as parameter.
CScript GetScriptForDestination(const CTxDestination &dest)
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
void GetAmounts(std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, std::string &strSentAccount, const isminefilter &filter) const
static std::pair< std::string, UniValue > Pair(const char *cKey, const char *cVal)
CAmount AmountFromValue(const UniValue &value)
Not enough funds in wallet or account.
std::string FormatMoney(const CAmount &n)
UniValue backupwallet(const UniValue ¶ms, bool fHelp)
UniValue getrawchangeaddress(const UniValue ¶ms, bool fHelp)
UniValue settxfee(const UniValue ¶ms, bool fHelp)
void RPCTypeCheckObj(const UniValue &o, const map< string, UniValue::VType > &typesExpected, bool fAllowNull)
UniValue listreceivedbyaccount(const UniValue ¶ms, bool fHelp)
UniValue listreceivedbyaddress(const UniValue ¶ms, bool fHelp)
Invalid, missing or duplicate parameter.
std::string strFromAccount
size_t KeypoolCountExternalKeys()
Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
UniValue keypoolrefill(const UniValue ¶ms, bool fHelp)
bool GetReservedKey(CPubKey &pubkey, bool fInternalIn)
std::string EncodeHexTx(const CTransaction &tx)
const char * TXLOCKREQUEST
CTxDestination Get() const
void RPCTypeCheck(const UniValue ¶ms, const list< UniValue::VType > &typesExpected, bool fAllowNull)
int GetOutpointPrivateSendRounds(const COutPoint &outpoint) const
bool EncryptWallet(const SecureString &strWalletPassphrase)
UniValue getbalance(const UniValue ¶ms, bool fHelp)
void updatePassphrase(const SecureString &sWalletPassphrase)
CKeePassIntegrator keePassInt
bool SignalsOptInRBF(const CTransaction &tx)
const uint256 & GetHash() const
Unspecified problem with wallet (key not found etc.)
bool Lock(bool fAllowMixing=false)
UniValue encryptwallet(const UniValue ¶ms, bool fHelp)
CAmount GetAccountCreditDebit(const std::string &strAccount)
int64_t GetAdjustedTime()
void GetAccountAmounts(const std::string &strAccount, CAmount &nReceived, CAmount &nSent, CAmount &nFee, const isminefilter &filter) const
UniValue addmultisigaddress(const UniValue ¶ms, bool fHelp)
UniValue instantsendtoaddress(const UniValue ¶ms, bool fHelp)
uint256 GetBlockHash() const
static SecureString generateKeePassKey()
UniValue sendtoaddress(const UniValue ¶ms, bool fHelp)
int64_t nWalletUnlockTime
std::string GetHex() const
UniValue sendmany(const UniValue ¶ms, bool fHelp)
std::map< CTxDestination, CAmount > GetAddressBalances()
std::unique_ptr< CConnman > g_connman
const UniValue NullUniValue
void rpcAssociate(std::string &strId, SecureString &sKeyBase64)
bool WriteAccount(const std::string &strAccount, const CAccount &account)
std::string HelpRequiringPassphrase()
const std::vector< CTxOut > vout
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE)
UniValue walletpassphrase(const UniValue ¶ms, bool fHelp)
bool GetKeyID(CKeyID &keyID) const
bool FundTransaction(CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosRet, std::string &strFailReason, bool includeWatching)
UniValue abandontransaction(const UniValue ¶ms, bool fHelp)
std::map< CTxDestination, CAddressBookData > mapAddressBook
bool ChangeWalletPassphrase(const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase)
UniValue getaddressesbyaccount(const UniValue ¶ms, bool fHelp)
UniValue sendfrom(const UniValue ¶ms, bool fHelp)
CTxDestination destination
int64_t GetTime()
For unit testing.
void LockCoin(COutPoint &output)
void AcentryToJSON(const CAccountingEntry &acentry, const string &strAccount, UniValue &ret)
static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtractFeeFromAmount, CWalletTx &wtxNew, bool fUseInstantSend=false, bool fUsePrivateSend=false)
static void LockWallet(CWallet *pWallet)
const string strMessageMagic
void ListLockedCoins(std::vector< COutPoint > &vOutpts)
void SetHex(const char *psz)
static void MaybePushAddress(UniValue &entry, const CTxDestination &dest)
int nHeight
height of the entry in the chain. The genesis block has height 0
CAmount GetImmatureBalance() const
int GetBlocksToMaturity() const
int GetDepthInMainChain(const CBlockIndex *&pindexRet, bool enableIX=true) const
UniValue JSONRPCError(int code, const string &message)
int64_t nKeysLeftSinceAutoBackup
const UniValue & get_array() const
CAmount GetAccountBalance(CWalletDB &walletdb, const string &strAccount, int nMinDepth, const isminefilter &filter, bool fAddLockConf)
std::string get_str() const
std::string itostr(int n)
UniValue gettransaction(const UniValue ¶ms, bool fHelp)
UniValue getaccount(const UniValue ¶ms, bool fHelp)
std::set< std::set< CTxDestination > > GetAddressGroupings()
bool DecodeHexTx(CTransaction &tx, const std::string &strHexTx)
UniValue ListReceived(const UniValue ¶ms, bool fByAccounts)
void AvailableCoins(std::vector< COutput > &vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL, bool fIncludeZeroValue=false, AvailableCoinsType nCoinType=ALL_COINS, bool fUseInstantSend=false) const
std::vector< UniValue > getValues() const
UniValue lockunspent(const UniValue ¶ms, bool fHelp)