Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
rpcwallet.cpp
Go to the documentation of this file.
51 if (!pwallet) throw JSONRPCError(RPC_WALLET_NOT_FOUND, "Requested wallet does not exist or is not loaded");
77 RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)");
86 throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first.");
97 chainlock = llmq::chainLocksHandler->HasChainLock(mapBlockIndex[wtx.hashBlock]->nHeight, wtx.hashBlock);
148 "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"
170 throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
180 CTxDestination GetAccountDestination(CWallet* const pwallet, std::string strAccount, bool bForceNew=false)
184 throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
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"
252 throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
294 // Detect when changing the account of an address that is the 'unused current key' of another account:
385 static void SendMoney(CWallet * const pwallet, const CTxDestination &address, CAmount nValue, bool fSubtractFeeFromAmount, CWalletTx& wtxNew, const CCoinControl& coin_control)
397 throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
414 strError = strprintf("Error: This transaction requires a transaction fee of at least %s", FormatMoney(nFeeRequired));
419 strError = strprintf("Error: The transaction was rejected! Reason given: %s", state.GetRejectReason());
433 "sendtoaddress \"address\" amount ( \"comment\" \"comment_to\" subtractfeefromamount use_is use_ps conf_target \"estimate_mode\")\n"
438 "2. \"amount\" (numeric or string, required) The amount in " + CURRENCY_UNIT + " to send. eg 0.1\n"
441 "4. \"comment_to\" (string, optional) A comment to store the name of the person or organization \n"
444 "5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
449 "9. \"estimate_mode\" (string, optional, default=UNSET) The fee estimate mode, must be one of:\n"
457 + HelpExampleCli("sendtoaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\" 0.1 \"donation\" \"seans outpost\"")
459 + HelpExampleRpc("sendtoaddress", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\", 0.1, \"donation\", \"seans outpost\"")
520 throw std::runtime_error("instantsendtoaddress is deprecated and sendtoaddress should be used instead");
522 LogPrintf("WARNING: Used deprecated RPC method 'instantsendtoaddress'! Please use 'sendtoaddress' instead\n");
596 "1. minamount (numeric, optional, default=0) Minimum balance in " + CURRENCY_UNIT + " an address should have to be shown in the list\n"
622 jsonBalances.push_back(Pair(EncodeDestination(balance.first), ValueFromAmount(balance.second)));
650 + HelpExampleCli("verifymessage", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\" \"signature\" \"my message\"") +
698 "\nReturns the total amount received by the given address in transactions with at least minconf confirmations.\n"
701 "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
702 "3. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
767 "\nDEPRECATED. Returns the total amount received by addresses with <account> in transactions with specified minimum number of confirmations.\n"
769 "1. \"account\" (string, required) The selected account, may be the default account using \"\".\n"
770 "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
771 "3. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
777 "\nAmount received at the tabby account including unconfirmed amounts with zero confirmations\n"
813 if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwallet, address) && setAddress.count(address)) {
841 "1. \"account\" (string, optional) DEPRECATED. The selected account, or \"*\" for entire wallet. It may be the default account using \"\".\n"
842 "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
843 "3. addlocked (bool, optional, default=false) Whether to include the value of transactions locked via InstantSend in the wallet's balance.\n"
844 "4. include_watchonly (bool, optional, default=false) Also include balance in watch-only addresses (see 'importaddress')\n"
934 "1. \"fromaccount\" (string, required) The name of the account to move funds from. May be the default account using \"\".\n"
935 "2. \"toaccount\" (string, required) The name of the account to move funds to. May be the default account using \"\".\n"
944 "\nMove 0.01 " + CURRENCY_UNIT + " timotei to akiko with a comment and funds have 6 confirmations\n"
982 "sendfrom \"fromaccount\" \"toaddress\" amount ( minconf addlocked \"comment\" \"comment_to\" )\n"
986 "1. \"fromaccount\" (string, required) The name of the account to send funds from. May be the default account using \"\".\n"
987 " Specifying an account does not influence coin selection, but it does associate the newly created\n"
988 " transaction with the account, so the account's balance computation and transaction history can reflect\n"
991 "3. amount (numeric or string, required) The amount in " + CURRENCY_UNIT + " (transaction fee is added on top).\n"
992 "4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
993 "5. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
996 "7. \"comment_to\" (string, optional) An optional comment to store the name of the person or organization \n"
1002 "\nSend 0.01 " + CURRENCY_UNIT + " from the default account to the address, must have at least 1 confirmation\n"
1004 "\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
1005 + HelpExampleCli("sendfrom", "\"tabby\" \"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\" 0.01 6 false \"donation\" \"seans outpost\"") +
1007 + HelpExampleRpc("sendfrom", "\"tabby\", \"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\", 0.01, 6, false, \"donation\", \"seans outpost\"")
1042 CAmount nBalance = pwallet->GetLegacyBalance(ISMINE_SPENDABLE, nMinDepth, &strAccount, fAddLocked);
1062 "sendmany \"fromaccount\" {\"address\":amount,...} ( minconf addlocked \"comment\" [\"address\",...] subtractfeefrom use_is use_ps conf_target \"estimate_mode\")\n"
1066 "1. \"fromaccount\" (string, required) DEPRECATED. The account to send the funds from. Should be \"\" for the default account\n"
1069 " \"address\":amount (numeric or string) The dash address is the key, the numeric amount (can be string) in " + CURRENCY_UNIT + " is the value\n"
1072 "3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
1073 "4. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
1077 " Those recipients will receive less dashs than you enter in their corresponding amount field.\n"
1086 "10. \"estimate_mode\" (string, optional, default=UNSET) The fee estimate mode, must be one of:\n"
1091 "\"txid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n"
1095 + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\\\":0.01,\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcG\\\":0.02}\"") +
1097 + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\\\":0.01,\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcG\\\":0.02}\" 6 false \"testing\"") +
1099 + HelpExampleRpc("sendmany", "\"tabby\", \"{\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\\\":0.01,\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcG\\\":0.02}\", 6, false, \"testing\"")
1112 throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
1161 throw JSONRPCError(RPC_INVALID_PARAMETER, std::string("Invalid parameter, duplicated address: ") + name_);
1185 CAmount nBalance = pwallet->GetLegacyBalance(ISMINE_SPENDABLE, nMinDepth, &strAccount, fAddLocked);
1195 bool fCreated = pwallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, nChangePosRet, strFailReason,
1218 "\nAdd a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup.\n"
1225 "1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
1236 " \"redeemScript\":\"script\" (string) The string value of the hex-encoded redemption script.\n"
1238 "\nResult (DEPRECATED. To see this result in v0.16 instead, please start dashd with -deprecatedrpc=addmultisigaddress).\n"
1244 + HelpExampleCli("addmultisigaddress", "2 \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrS\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK2\\\"]\"") +
1246 + HelpExampleRpc("addmultisigaddress", "2, \"[\\\"Xt4qk9uKvQYAonVGSZNXqxeDmtjaEWgfrS\\\",\\\"XoSoWQkpgLpppPoyyzbUFh1fq2RBvW6UK2\\\"]\"")
1263 if (IsHex(keys_or_addrs[i].get_str()) && (keys_or_addrs[i].get_str().length() == 66 || keys_or_addrs[i].get_str().length() == 130)) {
1440 "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
1441 "2. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
1442 "3. include_empty (bool, optional, default=false) Whether to include addresses that haven't received any payments.\n"
1443 "4. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').\n"
1448 " \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
1450 " \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n"
1451 " \"amount\" : x.xxx, (numeric) The total amount in " + CURRENCY_UNIT + " received by the address\n"
1452 " \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included.\n"
1493 "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
1494 "2. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
1495 "3. include_empty (bool, optional, default=false) Whether to include accounts that haven't received any payments.\n"
1496 "4. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').\n"
1501 " \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
1504 " \"confirmations\" : n (numeric) The number of blockchain confirmations of the most recent transaction included\n"
1545 void ListTransactions(CWallet * const pwallet, const CWalletTx& wtx, const std::string& strAccount, int nMinDepth, bool fLong, UniValue& ret, const isminefilter& filter)
1569 entry.push_back(Pair("category", (it != wtx.mapValue.end() && it->second == "1") ? "privatesend" : "send"));
1584 if (listReceived.size() > 0 && ((wtx.GetDepthInMainChain() >= nMinDepth) || wtx.IsLockedByInstantSend()))
1626 void AcentryToJSON(const CAccountingEntry& acentry, const std::string& strAccount, UniValue& ret)
1653 "\nReturns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.\n"
1658 "4. include_watchonly (bool, optional, default=false) Include transactions to watch-only addresses (see 'importaddress')\n"
1662 " \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
1666 " \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
1670 " \"amount\": x.xxx, (numeric) The amount in " + CURRENCY_UNIT + ". This is negative for the 'send' category, and for the\n"
1675 " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
1677 " \"confirmations\": n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and \n"
1680 " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions\n"
1681 " \"instantlock_internal\" : true|false, (bool) Current internal transaction lock state. Available for 'send' and 'receive' category of transactions\n"
1683 " \"trusted\": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.\n"
1684 " \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive'\n"
1686 " \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive'\n"
1689 " \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
1690 " \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
1691 " \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n"
1694 " \"otheraccount\": \"accountname\", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came \n"
1697 " \"abandoned\": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the \n"
1743 for (CWallet::TxItems::const_reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
1792 "1. minconf (numeric, optional, default=1) Only include transactions with at least this many confirmations\n"
1793 "2. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
1794 "3. include_watchonly (bool, optional, default=false) Include balances in watch-only addresses (see 'importaddress')\n"
1797 " \"account\": x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.\n"
1883 "If \"blockhash\" is no longer a part of the main chain, transactions from the fork point onward are included.\n"
1884 "Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the \"removed\" array.\n"
1887 "2. target_confirmations: (numeric, optional, default=1) Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value\n"
1888 "3. include_watchonly: (bool, optional, default=false) Include transactions to watch-only addresses (see 'importaddress')\n"
1889 "4. include_removed: (bool, optional, default=true) Show transactions that were removed due to a reorg in the \"removed\" array\n"
1894 " \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
1895 " \"address\":\"address\", (string) The dash address of the transaction. Not present for move transactions (category = move).\n"
1896 " \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
1897 " \"amount\": x.xxx, (numeric) The amount in " + CURRENCY_UNIT + ". This is negative for the 'send' category, and for the 'move' category for moves \n"
1898 " outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
1900 " \"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"
1901 " \"confirmations\" : n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
1903 " \"instantlock\" : true|false, (bool) Current transaction lock state. Available for 'send' and 'receive' category of transactions\n"
1904 " \"instantlock_internal\" : true|false, (bool) Current internal transaction lock state. Available for 'send' and 'receive' category of transactions\n"
1906 " \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
1907 " \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.\n"
1909 " \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
1911 " \"timereceived\": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n"
1912 " \"abandoned\": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.\n"
1919 " Note: transactions that were readded in the active chain will appear as-is in this array, and may thus have a positive confirmation count.\n"
1921 " \"lastblock\": \"lastblockhash\" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones\n"
1925 + HelpExampleCli("listsinceblock", "\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\" 6")
1926 + HelpExampleRpc("listsinceblock", "\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\", 6")
1937 const CBlockIndex* pindex = nullptr; // Block index of the specified block or the common ancestor, if the block provided was in a deactivated chain.
1938 const CBlockIndex* paltindex = nullptr; // Block index of the specified block, even if it's in a deactivated chain.
2028 "2. \"include_watchonly\" (bool, optional, default=false) Whether to include watch-only addresses in balance calculation and details[]\n"
2032 " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
2043 " \"timereceived\" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n"
2046 " \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
2052 " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
2054 " \"abandoned\": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the \n"
2063 + HelpExampleCli("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
2064 + HelpExampleCli("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\" true")
2065 + HelpExampleRpc("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
2123 "This will mark this transaction and all its in-wallet descendants as abandoned which will allow\n"
2124 "for their inputs to be respent. It can be used to replace \"stuck\" or evicted transactions.\n"
2125 "It only works on transactions which are not included in a block and are not currently in the mempool.\n"
2131 + HelpExampleCli("abandontransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
2132 + HelpExampleRpc("abandontransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
2167 "\nSafely copies current wallet file to destination, which can be a directory or a path with filename.\n"
2203 "1. newsize (numeric, optional, default=" + itostr(DEFAULT_KEYPOOL_SIZE) + ") The new keypool size\n"
2248 "This is needed prior to performing transactions related to private keys such as sending dashs\n"
2251 "2. timeout (numeric, required) The time to keep the decryption key in seconds; capped at 100000000 (~3 years).\n"
2252 "3. mixingonly (boolean, optional, default=false) If is true sending functions are disabled.\n"
2254 "Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock\n"
2273 throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called.");
2307 throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect.");
2312 RPCRunLater(strprintf("lockwallet(%s)", pwallet->GetName()), std::bind(LockWallet, pwallet), nSleepTime);
2343 throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrasechange was called.");
2362 throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect.");
2399 throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletlock was called.");
2426 "1. \"passphrase\" (string) The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.\n"
2446 throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an encrypted wallet, but encryptwallet was called.");
2468 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.";
2483 "If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.\n"
2484 "A locked transaction output will not be chosen by automatic coin selection, when spending dashs.\n"
2485 "Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
2489 "1. unlock (boolean, required) Whether to unlock (true) or lock (false) the specified transactions\n"
2490 "2. \"transactions\" (string, optional) A json array of objects. Each object the txid (string) vout (numeric)\n"
2506 + HelpExampleCli("lockunspent", "false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2510 + HelpExampleCli("lockunspent", "true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2512 + HelpExampleRpc("lockunspent", "false, \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"")
2622 + HelpExampleCli("lockunspent", "false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2626 + HelpExampleCli("lockunspent", "true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"") +
2690 "1. rounds (numeric, required) The default number of rounds is " + std::to_string(DEFAULT_PRIVATESEND_ROUNDS) +
2691 " Cannot be more than " + std::to_string(MAX_PRIVATESEND_ROUNDS) + " nor less than " + std::to_string(MIN_PRIVATESEND_ROUNDS) +
2718 "1. amount (numeric, required) The default amount is " + std::to_string(DEFAULT_PRIVATESEND_AMOUNT) +
2719 " Cannot be more than " + std::to_string(MAX_PRIVATESEND_AMOUNT) + " nor less than " + std::to_string(MIN_PRIVATESEND_AMOUNT) +
2728 throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid amount of " + CURRENCY_UNIT + " as mixing goal amount");
2750 " \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
2751 " \"privatesend_balance\": xxxxxx, (numeric) the PrivateSend balance in " + CURRENCY_UNIT + "\n"
2752 " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
2753 " \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + CURRENCY_UNIT + "\n"
2755 " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n"
2756 " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)\n"
2757 " \"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"
2759 " \"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"
2760 " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n"
2799 obj.push_back(Pair("keypoolsize_hd_internal", (int64_t)(pwallet->KeypoolCountInternalKeys())));
2942 throw JSONRPCError(RPC_WALLET_NOT_FOUND, "Directory " + wallet_file + " does not contain a wallet.dat file.");
2951 CWallet * const wallet = CWallet::CreateWalletFromFile(wallet_file, fs::absolute(wallet_file, GetWalletDir()));
2984 throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
2990 throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet transaction broadcasting is disabled with -walletbroadcast");
2993 std::vector<uint256> txids = pwallet->ResendWalletTransactionsBefore(GetTime(), g_connman.get());
3023 "4. include_unsafe (bool, optional, default=true) Include outputs that are not safe to spend\n"
3027 " \"minimumAmount\" (numeric or string, default=0) Minimum value of each UTXO in " + CURRENCY_UNIT + "\n"
3028 " \"maximumAmount\" (numeric or string, default=unlimited) Maximum value of each UTXO in " + CURRENCY_UNIT + "\n"
3030 " \"minimumSumAmount\" (numeric or string, default=unlimited) Minimum sum value of all UTXOs in " + CURRENCY_UNIT + "\n"
3041 " \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
3047 " \"solvable\" : xxx, (bool) Whether we know how to spend this output, ignoring the lack of keys\n"
3048 " \"safe\" : xxx (bool) Whether this output is considered safe to spend. Unconfirmed transactions\n"
3058 + HelpExampleCli("listunspent", "6 9999999 \"[\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\",\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\\\"]\"")
3059 + HelpExampleRpc("listunspent", "6, 9999999 \"[\\\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\\\",\\\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\\\"]\"")
3086 throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, std::string("Invalid Dash address: ") + input.get_str());
3089 throw JSONRPCError(RPC_INVALID_PARAMETER, std::string("Invalid parameter, duplicated address: ") + input.get_str());
3121 throw JSONRPCError(RPC_INVALID_PARAMETER, std::string("Invalid key used in query_options JSON object: ") + key);
3140 if (nCoinType < static_cast<int64_t>(CoinType::MIN_COIN_TYPE) || nCoinType > static_cast<int64_t>(CoinType::MAX_COIN_TYPE)) {
3141 throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid coinType selected. Available range: %d - %d", static_cast<int64_t>(CoinType::MIN_COIN_TYPE), static_cast<int64_t>(CoinType::MAX_COIN_TYPE)));
3156 pwallet->AvailableCoins(vecOutputs, !include_unsafe, &coinControl, nMinimumAmount, nMaximumAmount, nMinimumSumAmount, nMaximumCount, nMinDepth, nMaxDepth);
3191 entry.push_back(Pair("ps_rounds", pwallet->GetRealOutpointPrivateSendRounds(COutPoint(out.tx->GetHash(), out.i))));
3209 "This will not modify existing inputs, and will add at most one change output to the outputs.\n"
3211 "Note that inputs which were signed may need to be resigned after completion since in/outputs have been added.\n"
3213 "Note that all existing inputs must have their previous output transaction be in the wallet.\n"
3216 "You can see whether this is the case by checking the \"solvable\" field in the listunspent output.\n"
3217 "Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only\n"
3222 " \"changeAddress\" (string, optional, default pool address) The dash address to receive the change\n"
3224 " \"includeWatching\" (boolean, optional, default false) Also select inputs which are watch only\n"
3226 " \"feeRate\" (numeric, optional, default not set: makes wallet determine the fee) Set a specific fee rate in " + CURRENCY_UNIT + "/kB\n"
3230 " Those recipients will receive less dash than you enter in their corresponding amount field.\n"
3234 " \"estimate_mode\" (string, optional, default=UNSET) The fee estimate mode, must be one of:\n"
3239 " for backward compatibility: passing in a true instead of an object will result in {\"includeWatching\":true}\n"
3286 {"reserveChangeKey", UniValueType(UniValue::VBOOL)}, // DEPRECATED (and ignored), should be removed in 0.16 or so.
3346 if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > tx.vout.size()))
3352 throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, duplicated position: %d", pos));
3354 throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, negative position: %d", pos));
3356 throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, position too large: %d", pos));
3363 if (!pwallet->FundTransaction(tx, nFeeOut, changePosition, strFailReason, lockUnspents, setSubtractFeeFromOutputs, coinControl)) {
3387 "\nMine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.\n"
3410 throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
3438 " \"start_height\" (numeric) The block height where the rescan has started. If omitted, rescan started from the genesis block.\n"
3439 " \"stop_height\" (numeric) The height of the last rescanned block. If omitted, rescan stopped at the chain tip.\n"
3449 throw JSONRPCError(RPC_WALLET_ERROR, "Wallet is currently rescanning. Abort existing rescan or wait.");
3484 throw JSONRPCError(RPC_MISC_ERROR, "Can't rescan beyond pruned data. Use RPC call getblockchaininfo to determine your pruned height.");
3490 CBlockIndex *stopBlock = pwallet->ScanForWalletTransactions(pindexStart, pindexStop, reserver, true);
3495 // if we got a nullptr returned, ScanForWalletTransactions did rescan up to the requested stopindex
3537 { "wallet", "getbalance", &getbalance, {"account","minconf","addlocked","include_watchonly"} },
3540 { "wallet", "getreceivedbyaccount", &getreceivedbyaccount, {"account","minconf","addlocked"} },
3541 { "wallet", "getreceivedbyaddress", &getreceivedbyaddress, {"address","minconf","addlocked"} },
3556 { "wallet", "listreceivedbyaccount", &listreceivedbyaccount, {"minconf","addlocked","include_empty","include_watchonly"} },
3557 { "wallet", "listreceivedbyaddress", &listreceivedbyaddress, {"minconf","addlocked","include_empty","include_watchonly"} },
3558 { "wallet", "listsinceblock", &listsinceblock, {"blockhash","target_confirmations","include_watchonly","include_removed"} },
3559 { "wallet", "listtransactions", &listtransactions, {"account","count","skip","include_watchonly"} },
3560 { "wallet", "listunspent", &listunspent, {"minconf","maxconf","addresses","include_unsafe","query_options"} },
3565 { "wallet", "sendfrom", &sendfrom, {"fromaccount","toaddress","amount","minconf","addlocked","comment","comment_to"} },
3566 { "wallet", "sendmany", &sendmany, {"fromaccount","amounts","minconf","addlocked","comment","subtractfeefrom","use_is","use_ps","conf_target","estimate_mode"} },
3567 { "wallet", "sendtoaddress", &sendtoaddress, {"address","amount","comment","comment_to","subtractfeefromamount","use_is","use_ps","conf_target","estimate_mode"} },
3574 { "wallet", "walletpassphrasechange", &walletpassphrasechange, {"oldpassphrase","newpassphrase"} },
UniValue getunconfirmedbalance(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:898
No wallet specified (error when there are multiple wallets loaded)
Definition: protocol.h:87
void RPCTypeCheckObj(const UniValue &o, const std::map< std::string, UniValueType > &typesExpected, bool fAllowNull, bool fStrict)
Definition: server.cpp:79
CTxMemPool mempool
std::set< std::set< CTxDestination > > GetAddressGroupings()
Definition: wallet.cpp:4614
bool GetAccountDestination(CTxDestination &dest, std::string strAccount, bool bForceNew=false)
Definition: wallet.cpp:1043
CScript CreateMultisigRedeemscript(const int required, const std::vector< CPubKey > &pubkeys)
Definition: util.cpp:48
CPubKey AddrToPubKey(CKeyStore *const keystore, const std::string &addr_in)
Definition: util.cpp:27
void AcentryToJSON(const CAccountingEntry &acentry, const std::string &strAccount, UniValue &ret)
Definition: rpcwallet.cpp:1626
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:80
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Parse a standard scriptPubKey for the destination address.
Definition: standard.cpp:158
UniValue listaddressgroupings(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:526
UniValue resendwallettransactions(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:2966
Definition: wallet.h:167
bool fAllowWatchOnly
Includes watch only addresses which match the ISMINE_WATCH_SOLVABLE criteria.
Definition: coincontrol.h:37
static bool Verify(std::string wallet_file, bool salvage_wallet, std::string &error_string, std::string &warning_string)
Verify wallet naming and perform salvage on the wallet if required.
Definition: wallet.cpp:5024
Enter the wallet passphrase with walletpassphrase first.
Definition: protocol.h:81
void updatePassphrase(const SecureString &sWalletPassphrase)
Definition: keepass.cpp:533
bool FeeModeFromString(const std::string &mode_string, FeeEstimateMode &fee_estimate_mode)
Definition: fees.cpp:50
bool AccountMove(std::string strFrom, std::string strTo, CAmount nAmount, std::string strComment="")
Definition: wallet.cpp:1009
void postInitProcess()
Wallet post-init setup Gives the wallet a chance to register repetitive tasks and complete post-init ...
Definition: wallet.cpp:5302
UniValue setprivatesendamount(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:2707
UniValue abandontransaction(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:2112
Definition: block.h:72
boost::optional< unsigned int > m_confirm_target
Override the default confirmation target if set.
Definition: coincontrol.h:45
std::map< CTxDestination, CAddressBookData > mapAddressBook
Definition: wallet.h:906
UniValue instantsendtoaddress(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:517
static const CAmount MAX_MONEY
No amount larger than this (in satoshi) is valid.
Definition: amount.h:26
CAmount GetLegacyBalance(const isminefilter &filter, int minDepth, const std::string *account, const bool fAddLocked) const
Definition: wallet.cpp:2723
UniValue getreceivedbyaddress(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:688
UniValue getrawchangeaddress(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:224
bool HasChainLock(int nHeight, const uint256 &blockHash)
Definition: quorums_chainlocks.cpp:608
bool EnsureWalletIsAvailable(CWallet *const pwallet, bool avoidException)
Definition: rpcwallet.cpp:66
UniValue getaddressesbyaccount(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:346
Definition: protocol.h:44
UniValue fundrawtransaction(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:3198
CAmount GetDebit(const isminefilter &filter) const
filter decides which addresses will count towards the debit
Definition: wallet.cpp:2169
static const int DEFAULT_PRIVATESEND_AMOUNT
Definition: privatesend-client.h:31
bool GetCScript(const CScriptID &hash, CScript &redeemScriptOut) const override
Definition: keystore.cpp:90
static void SendMoney(CWallet *const pwallet, const CTxDestination &address, CAmount nValue, bool fSubtractFeeFromAmount, CWalletTx &wtxNew, const CCoinControl &coin_control)
Definition: rpcwallet.cpp:385
bool FundTransaction(CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, CCoinControl)
Insert additional inputs into the transaction by calling CreateTransaction();.
Definition: wallet.cpp:3252
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination is a CNoDestination.
Definition: standard.cpp:281
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
Definition: utilstrencodings.h:100
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: secure.h:57
Definition: univalue.h:20
void ListTransactions(CWallet *const pwallet, const CWalletTx &wtx, const std::string &strAccount, int nMinDepth, bool fLong, UniValue &ret, const isminefilter &filter)
List transactions based on the given criteria.
Definition: rpcwallet.cpp:1545
CBlockIndex * Genesis() const
Returns the index entry for the genesis block of this chain, or nullptr if none.
Definition: chain.h:448
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
Definition: server.cpp:583
Definition: univalue.h:22
static CWallet * CreateWalletFromFile(const std::string &name, const fs::path &path)
Definition: wallet.cpp:5075
bool EncryptWallet(const SecureString &strWalletPassphrase)
Definition: wallet.cpp:797
bool appendCommand(const std::string &name, const CRPCCommand *pcmd)
Appends a CRPCCommand to the dispatch table.
Definition: server.cpp:353
void rpcAssociate(std::string &strIdRet, SecureString &sKeyBase64Ret)
Definition: keepass.cpp:460
bool DecodeHexTx(CMutableTransaction &tx, const std::string &strHexTx)
Definition: core_read.cpp:90
void BlockUntilSyncedToCurrentChain()
Blocks until the wallet state is up-to-date to /at least/ the current chain at the time this function...
Definition: wallet.cpp:1517
bool IsSpent(const uint256 &hash, unsigned int n) const
Outpoint is spent if any non-conflicted transaction spends it:
Definition: wallet.cpp:755
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
Definition: pubkey.h:149
bool fOverrideFeeRate
Override automatic min/max checks on fee, m_feerate must be set if true.
Definition: coincontrol.h:39
std::string HelpRequiringPassphrase(CWallet *const pwallet)
Definition: rpcwallet.cpp:59
Definition: univalue.h:22
void RPCTypeCheck(const UniValue ¶ms, const std::list< UniValue::VType > &typesExpected, bool fAllowNull)
Type-check arguments; throws JSONRPCError if wrong type given.
Definition: server.cpp:54
CTxDestination GetAccountDestination(CWallet *const pwallet, std::string strAccount, bool bForceNew=false)
Definition: rpcwallet.cpp:180
std::map< CTxDestination, CAmount > GetAddressBalances()
Definition: wallet.cpp:4574
static SecureString generateKeePassKey()
Definition: keepass.cpp:453
boost::optional< CFeeRate > m_feerate
Override the default payTxFee if set.
Definition: coincontrol.h:41
UniValue listreceivedbyaddress(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:1428
const UniValue & find_value(const UniValue &obj, const std::string &name)
Definition: univalue.cpp:236
bool SignCompact(const uint256 &hash, std::vector< unsigned char > &vchSig) const
Create a compact signature (65 bytes), which allows reconstructing the used public key...
Definition: key.cpp:221
int nPrivateSendAmount
Definition: privatesend-client.h:210
Definition: hdchain.h:10
CInstantSendManager * quorumInstantSendManager
Definition: quorums_instantsend.cpp:40
void WalletTxToJSON(const CWalletTx &wtx, UniValue &entry)
Definition: rpcwallet.cpp:90
bool SetAddressBook(const CTxDestination &address, const std::string &strName, const std::string &purpose)
Definition: wallet.cpp:4277
The wallet passphrase entered was incorrect.
Definition: protocol.h:82
Definition: univalue.h:22
static const int DEFAULT_PRIVATESEND_ROUNDS
Definition: privatesend-client.h:30
Definition: univalue.h:22
bool CheckFinalTx(const CTransaction &tx, int flags)
Transaction validation functions.
Definition: validation.cpp:317
bool AbandonTransaction(const uint256 &hashTx)
Definition: wallet.cpp:1283
UniValue getreceivedbyaccount(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:757
UniValue setprivatesendrounds(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:2679
UniValue generateBlocks(std::shared_ptr< CReserveScript > coinbaseScript, int nGenerate, uint64_t nMaxTries, bool keepScript)
Generate blocks (mine)
bool AddCScript(const CScript &redeemScript) override
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.
Definition: wallet.cpp:467
int GetVersion()
get the current wallet format (the oldest client version guaranteed to understand this wallet) ...
Definition: wallet.h:1175
bool GetKey(const CKeyID &address, CKey &keyOut) const override
GetKey implementation that can derive a HD private key on the fly.
Definition: wallet.cpp:300
void RPCTypeCheckArgument(const UniValue &value, UniValue::VType typeExpected)
Type-check one argument; throws JSONRPCError if wrong type given.
Definition: server.cpp:72
virtual bool GetHDChain(CHDChain &hdChainRet) const override
Definition: crypter.cpp:539
bool IsLockedCoin(uint256 hash, unsigned int n) const
Definition: wallet.cpp:4820
UniValue walletpassphrasechange(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:2318
bool IsLocked(const uint256 &txHash)
Definition: quorums_instantsend.cpp:1464
Definition: univalue.h:22
Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
Definition: protocol.h:83
UniValue ListReceived(CWallet *const pwallet, const UniValue ¶ms, bool fByAccounts)
Definition: rpcwallet.cpp:1303
UniValue importprunedfunds(const JSONRPCRequest &request)
Definition: rpcdump.cpp:302
UniValue listaddressbalances(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:585
bool pushKV(const std::string &key, const UniValue &val)
Definition: univalue.cpp:135
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
Definition: standard.cpp:256
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
Definition: server.cpp:578
CoinType nCoinType
Controls which types of coins are allowed to be used (default: ALL_COINS)
Definition: coincontrol.h:49
static std::pair< std::string, UniValue > Pair(const char *cKey, const char *cVal)
Definition: univalue.h:185
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:26
std::string FormatMoney(const CAmount &n)
Money parsing/formatting utilities.
Definition: utilmoneystr.cpp:12
CAmount GetAnonymizedBalance(const CCoinControl *coinControl=nullptr) const
Definition: wallet.cpp:2577
bool IsDeprecatedRPCEnabled(const std::string &method)
Definition: server.cpp:447
Definition: rpcwallet.cpp:1289
bool Unlock(const SecureString &strWalletPassphrase, bool fForMixingOnly=false)
Definition: wallet.cpp:524
void RPCRunLater(const std::string &name, std::function< void(void)> func, int64_t nSeconds)
Run func nSeconds from now.
Definition: server.cpp:607
UniValue rescanblockchain(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:3422
UniValue getaccountaddress(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:190
void AvailableCoins(std::vector< COutput > &vCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t nMaximumCount=0, const int nMinDepth=0, const int nMaxDepth=9999999) const
populate vCoins with vector of available COutputs.
Definition: wallet.cpp:2775
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:280
bool GetBroadcastTransactions() const
Inquire whether this wallet broadcasts transactions.
Definition: wallet.h:1212
CBlockIndex * ScanForWalletTransactions(CBlockIndex *pindexStart, CBlockIndex *pindexStop, const WalletRescanReserver &reserver, bool fUpdate=false)
Scan the block chain (starting in pindexStart) for transactions from or to us.
Definition: wallet.cpp:2030
std::vector< uint256 > ResendWalletTransactionsBefore(int64_t nTime, CConnman *connman)
Definition: wallet.cpp:2461
std::set< CTxDestination > GetAccountAddresses(const std::string &strAccount) const
Definition: wallet.cpp:4707
void GetScriptForMining(std::shared_ptr< CReserveScript > &script)
Definition: wallet.cpp:4781
Definition: hdchain.h:28
UniValue walletpassphrase(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:2237
std::string EncodeDestination(const CTxDestination &dest)
Definition: base58.cpp:329
Definition: ismine.h:25
bool ChangeWalletPassphrase(const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase)
Definition: wallet.cpp:567
const std::string & GetName() const
Get a name for this wallet for logging/debugging purposes.
Definition: wallet.h:848
int nPrivateSendRounds
Definition: privatesend-client.h:208
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:947
Definition: wallet.h:566
Definition: ismine.h:24
CBlockIndex * Tip() const
Returns the index entry for the tip of this chain, or nullptr if none.
Definition: chain.h:453
bool CreateTransaction(const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, bool sign=true, int nExtraPayloadSize=0)
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also cr...
Definition: wallet.cpp:3658
Definition: protocol.h:40
Definition: server.h:37
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:715
unsigned int ParseConfirmTarget(const UniValue &value)
Check bounds on a command line confirm target.
Definition: mining.cpp:42
bool GetAccount(uint32_t nAccountIndex, CHDAccount &hdAccountRet)
Definition: hdchain.cpp:184
CWallet * GetWalletForJSONRPCRequest(const JSONRPCRequest &request)
Figures out what wallet, if any, to use for a JSONRPCRequest.
Definition: rpcwallet.cpp:45
UniValue removeprunedfunds(const JSONRPCRequest &request)
Definition: rpcdump.cpp:363
int GetRealOutpointPrivateSendRounds(const COutPoint &outpoint, int nRounds=0) const
Definition: wallet.cpp:1576
Definition: wallet.h:195
A reference to a CScript: the Hash160 of its serialization (see script.h)
Definition: standard.h:22
bool GetReservedKey(CPubKey &pubkey, bool fInternalIn)
Definition: wallet.cpp:4721
FeeEstimateMode m_fee_mode
Fee estimation mode to control arguments to estimateSmartFee.
Definition: coincontrol.h:47
UniValue importelectrumwallet(const JSONRPCRequest &request)
Definition: rpcdump.cpp:593
bool ReadBlockFromDisk(CBlock &block, const CDiskBlockPos &pos, const Consensus::Params &consensusParams)
Functions for disk access for blocks.
Definition: validation.cpp:1043
void ListLockedCoins(std::vector< COutPoint > &vOutpts) const
Definition: wallet.cpp:4828
CChain & chainActive
The currently-connected chain of blocks (protected by cs_main).
Definition: validation.cpp:217
AssertLockHeld(g_cs_orphans)
static void MaybePushAddress(UniValue &entry, const CTxDestination &dest)
Definition: rpcwallet.cpp:1527
UniValue listtransactions(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:1643
const CBlockIndex * FindFork(const CBlockIndex *pindex) const
Find the last common block between this chain and a block index entry.
Definition: chain.cpp:51
int GetDepthInMainChain(const CBlockIndex *&pindexRet) const
Return depth of transaction in blockchain: <0 : conflicts with a transaction this deep in the blockch...
Definition: wallet.cpp:5501
CAmount GetFeePerK() const
Return the fee in satoshis for a size of 1000 bytes.
Definition: feerate.h:41
UniValue listlockunspent(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:2598
isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
Definition: ismine.cpp:28
Wrapper for UniValue::VType, which includes typeAny: Used to denote don't care type.
Definition: server.h:30
int64_t nRelockTime
Holds a timestamp at which point the wallet is scheduled (externally) to be relocked. Caller must arrange for actual relocking to occur via Lock().
Definition: wallet.h:1034
Definition: serialize.h:162
Error parsing or validating structure in raw format.
Definition: protocol.h:55
std::string EncodeBase64(const unsigned char *pch, size_t len)
Definition: utilstrencodings.cpp:126
void EnsureWalletIsUnlocked(CWallet *const pwallet)
Definition: rpcwallet.cpp:83
UniValue listreceivedbyaccount(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:1481
bool CommitTransaction(CWalletTx &wtxNew, CReserveKey &reservekey, CConnman *connman, CValidationState &state)
Call after CreateTransaction unless you want to abort.
Definition: wallet.cpp:4089
void GetAmounts(std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, std::string &strSentAccount, const isminefilter &filter) const
Definition: wallet.cpp:1929
Definition: server.h:128
UniValue addmultisigaddress(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:1208