|
|
@ -114,11 +114,11 @@ Value getnewaddress(const Array& params, bool fHelp)
|
|
|
|
if (fHelp || params.size() > 1)
|
|
|
|
if (fHelp || params.size() > 1)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"getnewaddress ( \"account\" )\n"
|
|
|
|
"getnewaddress ( \"account\" )\n"
|
|
|
|
"\nReturns a new Bitcoin address for receiving payments.\n"
|
|
|
|
"\nReturns a new Zcash address for receiving payments.\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"account\" (string, optional) DEPRECATED. If provided, it MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"1. \"account\" (string, optional) DEPRECATED. If provided, it MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\"bitcoinaddress\" (string) The new bitcoin address\n"
|
|
|
|
"\"zcashaddress\" (string) The new zcash address\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
+ HelpExampleCli("getnewaddress", "")
|
|
|
|
+ HelpExampleCli("getnewaddress", "")
|
|
|
|
+ HelpExampleRpc("getnewaddress", "")
|
|
|
|
+ HelpExampleRpc("getnewaddress", "")
|
|
|
@ -191,11 +191,11 @@ Value getaccountaddress(const Array& params, bool fHelp)
|
|
|
|
if (fHelp || params.size() != 1)
|
|
|
|
if (fHelp || params.size() != 1)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"getaccountaddress \"account\"\n"
|
|
|
|
"getaccountaddress \"account\"\n"
|
|
|
|
"\nDEPRECATED. Returns the current Bitcoin address for receiving payments to this account.\n"
|
|
|
|
"\nDEPRECATED. Returns the current Zcash address for receiving payments to this account.\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\"bitcoinaddress\" (string) The account bitcoin address\n"
|
|
|
|
"\"zcashaddress\" (string) The account zcash address\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
+ HelpExampleCli("getaccountaddress", "")
|
|
|
|
+ HelpExampleCli("getaccountaddress", "")
|
|
|
|
+ HelpExampleCli("getaccountaddress", "\"\"")
|
|
|
|
+ HelpExampleCli("getaccountaddress", "\"\"")
|
|
|
@ -223,7 +223,7 @@ Value getrawchangeaddress(const Array& params, bool fHelp)
|
|
|
|
if (fHelp || params.size() > 1)
|
|
|
|
if (fHelp || params.size() > 1)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"getrawchangeaddress\n"
|
|
|
|
"getrawchangeaddress\n"
|
|
|
|
"\nReturns a new Bitcoin address, for receiving change.\n"
|
|
|
|
"\nReturns a new Zcash address, for receiving change.\n"
|
|
|
|
"This is for use with raw transactions, NOT normal use.\n"
|
|
|
|
"This is for use with raw transactions, NOT normal use.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\"address\" (string) The address\n"
|
|
|
|
"\"address\" (string) The address\n"
|
|
|
@ -257,10 +257,10 @@ Value setaccount(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
|
|
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"setaccount \"bitcoinaddress\" \"account\"\n"
|
|
|
|
"setaccount \"zcashaddress\" \"account\"\n"
|
|
|
|
"\nDEPRECATED. Sets the account associated with the given address.\n"
|
|
|
|
"\nDEPRECATED. Sets the account associated with the given address.\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"bitcoinaddress\" (string, required) The bitcoin address to be associated with an account.\n"
|
|
|
|
"1. \"zcashaddress\" (string, required) The zcash address to be associated with an account.\n"
|
|
|
|
"2. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"2. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
+ HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"")
|
|
|
|
+ HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"")
|
|
|
@ -271,7 +271,7 @@ Value setaccount(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
CBitcoinAddress address(params[0].get_str());
|
|
|
|
CBitcoinAddress address(params[0].get_str());
|
|
|
|
if (!address.IsValid())
|
|
|
|
if (!address.IsValid())
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
|
|
|
|
|
|
|
|
|
|
|
|
string strAccount;
|
|
|
|
string strAccount;
|
|
|
|
if (params.size() > 1)
|
|
|
|
if (params.size() > 1)
|
|
|
@ -303,10 +303,10 @@ Value getaccount(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
if (fHelp || params.size() != 1)
|
|
|
|
if (fHelp || params.size() != 1)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"getaccount \"bitcoinaddress\"\n"
|
|
|
|
"getaccount \"zcashaddress\"\n"
|
|
|
|
"\nDEPRECATED. Returns the account associated with the given address.\n"
|
|
|
|
"\nDEPRECATED. Returns the account associated with the given address.\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"bitcoinaddress\" (string, required) The bitcoin address for account lookup.\n"
|
|
|
|
"1. \"zcashaddress\" (string, required) The zcash address for account lookup.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\"accountname\" (string) the account address\n"
|
|
|
|
"\"accountname\" (string) the account address\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
@ -318,7 +318,7 @@ Value getaccount(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
CBitcoinAddress address(params[0].get_str());
|
|
|
|
CBitcoinAddress address(params[0].get_str());
|
|
|
|
if (!address.IsValid())
|
|
|
|
if (!address.IsValid())
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
|
|
|
|
|
|
|
|
|
|
|
|
string strAccount;
|
|
|
|
string strAccount;
|
|
|
|
map<CTxDestination, CAddressBookData>::iterator mi = pwalletMain->mapAddressBook.find(address.Get());
|
|
|
|
map<CTxDestination, CAddressBookData>::iterator mi = pwalletMain->mapAddressBook.find(address.Get());
|
|
|
@ -341,7 +341,7 @@ Value getaddressesbyaccount(const Array& params, bool fHelp)
|
|
|
|
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"1. \"account\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"[ (json array of string)\n"
|
|
|
|
"[ (json array of string)\n"
|
|
|
|
" \"bitcoinaddress\" (string) a bitcoin address associated with the given account\n"
|
|
|
|
" \"zcashaddress\" (string) a zcash address associated with the given account\n"
|
|
|
|
" ,...\n"
|
|
|
|
" ,...\n"
|
|
|
|
"]\n"
|
|
|
|
"]\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
@ -376,7 +376,7 @@ static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtr
|
|
|
|
if (nValue > curBalance)
|
|
|
|
if (nValue > curBalance)
|
|
|
|
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
|
|
|
|
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
|
|
|
|
|
|
|
|
|
|
|
|
// Parse Bitcoin address
|
|
|
|
// Parse Zcash address
|
|
|
|
CScript scriptPubKey = GetScriptForDestination(address);
|
|
|
|
CScript scriptPubKey = GetScriptForDestination(address);
|
|
|
|
|
|
|
|
|
|
|
|
// Create and send the transaction
|
|
|
|
// Create and send the transaction
|
|
|
@ -403,11 +403,11 @@ Value sendtoaddress(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
if (fHelp || params.size() < 2 || params.size() > 5)
|
|
|
|
if (fHelp || params.size() < 2 || params.size() > 5)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
|
|
|
"sendtoaddress \"zcashaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
|
|
|
|
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
|
|
|
|
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
|
|
|
|
+ HelpRequiringPassphrase() +
|
|
|
|
+ HelpRequiringPassphrase() +
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"bitcoinaddress\" (string, required) The bitcoin address to send to.\n"
|
|
|
|
"1. \"zcashaddress\" (string, required) The zcash address to send to.\n"
|
|
|
|
"2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n"
|
|
|
|
"2. \"amount\" (numeric, required) The amount in btc to send. eg 0.1\n"
|
|
|
|
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
|
|
|
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
|
|
|
" This is not part of the transaction, just kept in your wallet.\n"
|
|
|
|
" This is not part of the transaction, just kept in your wallet.\n"
|
|
|
@ -415,7 +415,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
|
|
|
|
" to which you're sending the transaction. This is not part of the \n"
|
|
|
|
" to which you're sending the transaction. This is not part of the \n"
|
|
|
|
" transaction, just kept in your wallet.\n"
|
|
|
|
" transaction, just kept in your wallet.\n"
|
|
|
|
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
|
|
|
|
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
|
|
|
|
" The recipient will receive less bitcoins than you enter in the amount field.\n"
|
|
|
|
" The recipient will receive less zcash than you enter in the amount field.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\"transactionid\" (string) The transaction id.\n"
|
|
|
|
"\"transactionid\" (string) The transaction id.\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
@ -429,7 +429,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
CBitcoinAddress address(params[0].get_str());
|
|
|
|
CBitcoinAddress address(params[0].get_str());
|
|
|
|
if (!address.IsValid())
|
|
|
|
if (!address.IsValid())
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
|
|
|
|
|
|
|
|
|
|
|
|
// Amount
|
|
|
|
// Amount
|
|
|
|
CAmount nAmount = AmountFromValue(params[1]);
|
|
|
|
CAmount nAmount = AmountFromValue(params[1]);
|
|
|
@ -467,7 +467,7 @@ Value listaddressgroupings(const Array& params, bool fHelp)
|
|
|
|
"[\n"
|
|
|
|
"[\n"
|
|
|
|
" [\n"
|
|
|
|
" [\n"
|
|
|
|
" [\n"
|
|
|
|
" [\n"
|
|
|
|
" \"bitcoinaddress\", (string) The bitcoin address\n"
|
|
|
|
" \"zcashaddress\", (string) The zcash address\n"
|
|
|
|
" amount, (numeric) The amount in btc\n"
|
|
|
|
" amount, (numeric) The amount in btc\n"
|
|
|
|
" \"account\" (string, optional) The account (DEPRECATED)\n"
|
|
|
|
" \"account\" (string, optional) The account (DEPRECATED)\n"
|
|
|
|
" ]\n"
|
|
|
|
" ]\n"
|
|
|
@ -510,11 +510,11 @@ Value signmessage(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
if (fHelp || params.size() != 2)
|
|
|
|
if (fHelp || params.size() != 2)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"signmessage \"bitcoinaddress\" \"message\"\n"
|
|
|
|
"signmessage \"zcashaddress\" \"message\"\n"
|
|
|
|
"\nSign a message with the private key of an address"
|
|
|
|
"\nSign a message with the private key of an address"
|
|
|
|
+ HelpRequiringPassphrase() + "\n"
|
|
|
|
+ HelpRequiringPassphrase() + "\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the private key.\n"
|
|
|
|
"1. \"zcashaddress\" (string, required) The zcash address to use for the private key.\n"
|
|
|
|
"2. \"message\" (string, required) The message to create a signature of.\n"
|
|
|
|
"2. \"message\" (string, required) The message to create a signature of.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\"signature\" (string) The signature of the message encoded in base 64\n"
|
|
|
|
"\"signature\" (string) The signature of the message encoded in base 64\n"
|
|
|
@ -566,10 +566,10 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
|
|
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n"
|
|
|
|
"getreceivedbyaddress \"zcashaddress\" ( minconf )\n"
|
|
|
|
"\nReturns the total amount received by the given bitcoinaddress in transactions with at least minconf confirmations.\n"
|
|
|
|
"\nReturns the total amount received by the given zcashaddress in transactions with at least minconf confirmations.\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"bitcoinaddress\" (string, required) The bitcoin address for transactions.\n"
|
|
|
|
"1. \"zcashaddress\" (string, required) The zcash address for transactions.\n"
|
|
|
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
|
|
|
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"amount (numeric) The total amount in btc received at this address.\n"
|
|
|
|
"amount (numeric) The total amount in btc received at this address.\n"
|
|
|
@ -589,7 +589,7 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
|
|
|
|
// Bitcoin address
|
|
|
|
// Bitcoin address
|
|
|
|
CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
|
|
|
|
CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
|
|
|
|
if (!address.IsValid())
|
|
|
|
if (!address.IsValid())
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
|
|
|
|
CScript scriptPubKey = GetScriptForDestination(address.Get());
|
|
|
|
CScript scriptPubKey = GetScriptForDestination(address.Get());
|
|
|
|
if (!IsMine(*pwalletMain,scriptPubKey))
|
|
|
|
if (!IsMine(*pwalletMain,scriptPubKey))
|
|
|
|
return (double)0.0;
|
|
|
|
return (double)0.0;
|
|
|
@ -871,13 +871,13 @@ Value sendfrom(const Array& params, bool fHelp)
|
|
|
|
|
|
|
|
|
|
|
|
if (fHelp || params.size() < 3 || params.size() > 6)
|
|
|
|
if (fHelp || params.size() < 3 || params.size() > 6)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
|
|
|
"sendfrom \"fromaccount\" \"tozcashaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
|
|
|
|
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a bitcoin address.\n"
|
|
|
|
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a zcash address.\n"
|
|
|
|
"The amount is a real and is rounded to the nearest 0.00000001."
|
|
|
|
"The amount is a real and is rounded to the nearest 0.00000001."
|
|
|
|
+ HelpRequiringPassphrase() + "\n"
|
|
|
|
+ HelpRequiringPassphrase() + "\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"2. \"tobitcoinaddress\" (string, required) The bitcoin address to send funds to.\n"
|
|
|
|
"2. \"tozcashaddress\" (string, required) The zcash address to send funds to.\n"
|
|
|
|
"3. amount (numeric, required) The amount in btc. (transaction fee is added on top).\n"
|
|
|
|
"3. amount (numeric, required) The amount in btc. (transaction fee is added on top).\n"
|
|
|
|
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
|
|
|
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
|
|
|
|
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
|
|
|
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
|
|
|
@ -901,7 +901,7 @@ Value sendfrom(const Array& params, bool fHelp)
|
|
|
|
string strAccount = AccountFromValue(params[0]);
|
|
|
|
string strAccount = AccountFromValue(params[0]);
|
|
|
|
CBitcoinAddress address(params[1].get_str());
|
|
|
|
CBitcoinAddress address(params[1].get_str());
|
|
|
|
if (!address.IsValid())
|
|
|
|
if (!address.IsValid())
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Zcash address");
|
|
|
|
CAmount nAmount = AmountFromValue(params[2]);
|
|
|
|
CAmount nAmount = AmountFromValue(params[2]);
|
|
|
|
int nMinDepth = 1;
|
|
|
|
int nMinDepth = 1;
|
|
|
|
if (params.size() > 3)
|
|
|
|
if (params.size() > 3)
|
|
|
@ -941,14 +941,14 @@ Value sendmany(const Array& params, bool fHelp)
|
|
|
|
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"1. \"fromaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
|
|
|
|
"2. \"amounts\" (string, required) A json object with addresses and amounts\n"
|
|
|
|
" {\n"
|
|
|
|
" {\n"
|
|
|
|
" \"address\":amount (numeric) The bitcoin address is the key, the numeric amount in btc is the value\n"
|
|
|
|
" \"address\":amount (numeric) The zcash address is the key, the numeric amount in btc is the value\n"
|
|
|
|
" ,...\n"
|
|
|
|
" ,...\n"
|
|
|
|
" }\n"
|
|
|
|
" }\n"
|
|
|
|
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
|
|
|
|
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
|
|
|
|
"4. \"comment\" (string, optional) A comment\n"
|
|
|
|
"4. \"comment\" (string, optional) A comment\n"
|
|
|
|
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
|
|
|
|
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
|
|
|
|
" The fee will be equally deducted from the amount of each selected address.\n"
|
|
|
|
" The fee will be equally deducted from the amount of each selected address.\n"
|
|
|
|
" Those recipients will receive less bitcoins than you enter in their corresponding amount field.\n"
|
|
|
|
" Those recipients will receive less zcashs than you enter in their corresponding amount field.\n"
|
|
|
|
" If no addresses are specified here, the sender pays the fee.\n"
|
|
|
|
" If no addresses are specified here, the sender pays the fee.\n"
|
|
|
|
" [\n"
|
|
|
|
" [\n"
|
|
|
|
" \"address\" (string) Subtract fee from this address\n"
|
|
|
|
" \"address\" (string) Subtract fee from this address\n"
|
|
|
@ -993,7 +993,7 @@ Value sendmany(const Array& params, bool fHelp)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CBitcoinAddress address(s.name_);
|
|
|
|
CBitcoinAddress address(s.name_);
|
|
|
|
if (!address.IsValid())
|
|
|
|
if (!address.IsValid())
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+s.name_);
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Zcash address: ")+s.name_);
|
|
|
|
|
|
|
|
|
|
|
|
if (setAddress.count(address))
|
|
|
|
if (setAddress.count(address))
|
|
|
|
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
|
|
|
|
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
|
|
|
@ -1045,20 +1045,20 @@ Value addmultisigaddress(const Array& params, bool fHelp)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
|
|
|
|
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
|
|
|
|
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
|
|
|
|
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
|
|
|
|
"Each key is a Bitcoin address or hex-encoded public key.\n"
|
|
|
|
"Each key is a Zcash address or hex-encoded public key.\n"
|
|
|
|
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
|
|
|
|
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
|
|
|
|
|
|
|
|
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
|
|
|
|
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
|
|
|
|
"2. \"keysobject\" (string, required) A json array of bitcoin addresses or hex-encoded public keys\n"
|
|
|
|
"2. \"keysobject\" (string, required) A json array of zcash addresses or hex-encoded public keys\n"
|
|
|
|
" [\n"
|
|
|
|
" [\n"
|
|
|
|
" \"address\" (string) bitcoin address or hex-encoded public key\n"
|
|
|
|
" \"address\" (string) zcash address or hex-encoded public key\n"
|
|
|
|
" ...,\n"
|
|
|
|
" ...,\n"
|
|
|
|
" ]\n"
|
|
|
|
" ]\n"
|
|
|
|
"3. \"account\" (string, optional) DEPRECATED. If provided, MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
"3. \"account\" (string, optional) DEPRECATED. If provided, MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
|
|
|
|
|
|
|
|
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"\"bitcoinaddress\" (string) A bitcoin address associated with the keys.\n"
|
|
|
|
"\"zcashaddress\" (string) A zcash address associated with the keys.\n"
|
|
|
|
|
|
|
|
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nAdd a multisig address from 2 addresses\n"
|
|
|
|
"\nAdd a multisig address from 2 addresses\n"
|
|
|
@ -1403,7 +1403,7 @@ Value listtransactions(const Array& params, bool fHelp)
|
|
|
|
" {\n"
|
|
|
|
" {\n"
|
|
|
|
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
|
|
|
|
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
|
|
|
|
" It will be \"\" for the default account.\n"
|
|
|
|
" It will be \"\" for the default account.\n"
|
|
|
|
" \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for \n"
|
|
|
|
" \"address\":\"zcashaddress\", (string) The zcash address of the transaction. Not present for \n"
|
|
|
|
" move transactions (category = move).\n"
|
|
|
|
" move transactions (category = move).\n"
|
|
|
|
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
|
|
|
|
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
|
|
|
|
" transaction between accounts, and not associated with an address,\n"
|
|
|
|
" transaction between accounts, and not associated with an address,\n"
|
|
|
@ -1595,7 +1595,7 @@ Value listsinceblock(const Array& params, bool fHelp)
|
|
|
|
"{\n"
|
|
|
|
"{\n"
|
|
|
|
" \"transactions\": [\n"
|
|
|
|
" \"transactions\": [\n"
|
|
|
|
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
|
|
|
|
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
|
|
|
|
" \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).\n"
|
|
|
|
" \"address\":\"zcashaddress\", (string) The zcash address of the transaction. Not present for move transactions (category = move).\n"
|
|
|
|
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
|
|
|
|
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
|
|
|
|
" \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves \n"
|
|
|
|
" \"amount\": x.xxx, (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves \n"
|
|
|
|
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
|
|
|
|
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
|
|
|
@ -1694,7 +1694,7 @@ Value gettransaction(const Array& params, bool fHelp)
|
|
|
|
" \"details\" : [\n"
|
|
|
|
" \"details\" : [\n"
|
|
|
|
" {\n"
|
|
|
|
" {\n"
|
|
|
|
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
|
|
|
|
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
|
|
|
|
" \"address\" : \"bitcoinaddress\", (string) The bitcoin address involved in the transaction\n"
|
|
|
|
" \"address\" : \"zcashaddress\", (string) The zcash address involved in the transaction\n"
|
|
|
|
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
|
|
|
|
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
|
|
|
|
" \"amount\" : x.xxx (numeric) The amount in btc\n"
|
|
|
|
" \"amount\" : x.xxx (numeric) The amount in btc\n"
|
|
|
|
" \"vout\" : n, (numeric) the vout value\n"
|
|
|
|
" \"vout\" : n, (numeric) the vout value\n"
|
|
|
@ -1837,7 +1837,7 @@ Value walletpassphrase(const Array& params, bool fHelp)
|
|
|
|
throw runtime_error(
|
|
|
|
throw runtime_error(
|
|
|
|
"walletpassphrase \"passphrase\" timeout\n"
|
|
|
|
"walletpassphrase \"passphrase\" timeout\n"
|
|
|
|
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
|
|
|
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
|
|
|
"This is needed prior to performing transactions related to private keys such as sending bitcoins\n"
|
|
|
|
"This is needed prior to performing transactions related to private keys such as sending zcash\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. \"passphrase\" (string, required) The wallet passphrase\n"
|
|
|
|
"1. \"passphrase\" (string, required) The wallet passphrase\n"
|
|
|
|
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
|
|
|
|
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
|
|
|
@ -2002,10 +2002,10 @@ Value encryptwallet(const Array& params, bool fHelp)
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nExamples:\n"
|
|
|
|
"\nEncrypt you wallet\n"
|
|
|
|
"\nEncrypt you wallet\n"
|
|
|
|
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
|
|
|
|
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
|
|
|
|
"\nNow set the passphrase to use the wallet, such as for signing or sending bitcoin\n"
|
|
|
|
"\nNow set the passphrase to use the wallet, such as for signing or sending zcash\n"
|
|
|
|
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
|
|
|
|
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
|
|
|
|
"\nNow we can so something like sign\n"
|
|
|
|
"\nNow we can so something like sign\n"
|
|
|
|
+ HelpExampleCli("signmessage", "\"bitcoinaddress\" \"test message\"") +
|
|
|
|
+ HelpExampleCli("signmessage", "\"zcashaddress\" \"test message\"") +
|
|
|
|
"\nNow lock the wallet again by removing the passphrase\n"
|
|
|
|
"\nNow lock the wallet again by removing the passphrase\n"
|
|
|
|
+ HelpExampleCli("walletlock", "") +
|
|
|
|
+ HelpExampleCli("walletlock", "") +
|
|
|
|
"\nAs a json rpc call\n"
|
|
|
|
"\nAs a json rpc call\n"
|
|
|
@ -2040,7 +2040,7 @@ Value encryptwallet(const Array& params, bool fHelp)
|
|
|
|
// slack space in .dat files; that is bad if the old data is
|
|
|
|
// slack space in .dat files; that is bad if the old data is
|
|
|
|
// unencrypted private keys. So:
|
|
|
|
// unencrypted private keys. So:
|
|
|
|
StartShutdown();
|
|
|
|
StartShutdown();
|
|
|
|
return "wallet encrypted; Bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
|
|
|
|
return "wallet encrypted; Zcash server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Value lockunspent(const Array& params, bool fHelp)
|
|
|
|
Value lockunspent(const Array& params, bool fHelp)
|
|
|
@ -2053,7 +2053,7 @@ Value lockunspent(const Array& params, bool fHelp)
|
|
|
|
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
|
|
|
|
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
|
|
|
|
"\nUpdates list of temporarily unspendable outputs.\n"
|
|
|
|
"\nUpdates list of temporarily unspendable outputs.\n"
|
|
|
|
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
|
|
|
|
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
|
|
|
|
"A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins.\n"
|
|
|
|
"A locked transaction output will not be chosen by automatic coin selection, when spending zcash.\n"
|
|
|
|
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
|
|
|
|
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
|
|
|
|
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
|
|
|
|
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
|
|
|
|
"Also see the listunspent call\n"
|
|
|
|
"Also see the listunspent call\n"
|
|
|
@ -2217,8 +2217,8 @@ Value getwalletinfo(const Array& params, bool fHelp)
|
|
|
|
"\nResult:\n"
|
|
|
|
"\nResult:\n"
|
|
|
|
"{\n"
|
|
|
|
"{\n"
|
|
|
|
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
|
|
|
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
|
|
|
" \"balance\": xxxxxxx, (numeric) the total confirmed bitcoin balance of the wallet\n"
|
|
|
|
" \"balance\": xxxxxxx, (numeric) the total confirmed zcash balance of the wallet\n"
|
|
|
|
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed bitcoin balance of the wallet\n"
|
|
|
|
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed zcash balance of the wallet\n"
|
|
|
|
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet\n"
|
|
|
|
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet\n"
|
|
|
|
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
|
|
|
|
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
|
|
|
|
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
|
|
|
|
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
|
|
|
@ -2286,9 +2286,9 @@ Value listunspent(const Array& params, bool fHelp)
|
|
|
|
"\nArguments:\n"
|
|
|
|
"\nArguments:\n"
|
|
|
|
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
|
|
|
|
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
|
|
|
|
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
|
|
|
|
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
|
|
|
|
"3. \"addresses\" (string) A json array of bitcoin addresses to filter\n"
|
|
|
|
"3. \"addresses\" (string) A json array of zcash addresses to filter\n"
|
|
|
|
" [\n"
|
|
|
|
" [\n"
|
|
|
|
" \"address\" (string) bitcoin address\n"
|
|
|
|
" \"address\" (string) zcash address\n"
|
|
|
|
" ,...\n"
|
|
|
|
" ,...\n"
|
|
|
|
" ]\n"
|
|
|
|
" ]\n"
|
|
|
|
"\nResult\n"
|
|
|
|
"\nResult\n"
|
|
|
@ -2296,7 +2296,7 @@ Value listunspent(const Array& params, bool fHelp)
|
|
|
|
" {\n"
|
|
|
|
" {\n"
|
|
|
|
" \"txid\" : \"txid\", (string) the transaction id \n"
|
|
|
|
" \"txid\" : \"txid\", (string) the transaction id \n"
|
|
|
|
" \"vout\" : n, (numeric) the vout value\n"
|
|
|
|
" \"vout\" : n, (numeric) the vout value\n"
|
|
|
|
" \"address\" : \"address\", (string) the bitcoin address\n"
|
|
|
|
" \"address\" : \"address\", (string) the zcash address\n"
|
|
|
|
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
|
|
|
|
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
|
|
|
|
" \"scriptPubKey\" : \"key\", (string) the script key\n"
|
|
|
|
" \"scriptPubKey\" : \"key\", (string) the script key\n"
|
|
|
|
" \"amount\" : x.xxx, (numeric) the transaction amount in btc\n"
|
|
|
|
" \"amount\" : x.xxx, (numeric) the transaction amount in btc\n"
|
|
|
@ -2327,7 +2327,7 @@ Value listunspent(const Array& params, bool fHelp)
|
|
|
|
BOOST_FOREACH(Value& input, inputs) {
|
|
|
|
BOOST_FOREACH(Value& input, inputs) {
|
|
|
|
CBitcoinAddress address(input.get_str());
|
|
|
|
CBitcoinAddress address(input.get_str());
|
|
|
|
if (!address.IsValid())
|
|
|
|
if (!address.IsValid())
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+input.get_str());
|
|
|
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Zcash address: ")+input.get_str());
|
|
|
|
if (setAddress.count(address))
|
|
|
|
if (setAddress.count(address))
|
|
|
|
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str());
|
|
|
|
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str());
|
|
|
|
setAddress.insert(address);
|
|
|
|
setAddress.insert(address);
|
|
|
|