This commit is contained in:
Duke Leto
2021-01-23 22:18:57 -05:00
parent ed7ed6d193
commit 2e31b7d2dc
20 changed files with 205 additions and 233 deletions

View File

@@ -165,9 +165,9 @@ string AccountFromValue(const UniValue& value)
return strAccount;
}
char *komodo_chainname()
char *hush_chainname()
{
return(SMART_CHAIN_SYMBOL[0] == 0 ? (char *)"KMD" : SMART_CHAIN_SYMBOL);
return(SMART_CHAIN_SYMBOL);
}
void OS_randombytes(unsigned char *x,long xlen);
@@ -180,11 +180,11 @@ UniValue getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
if (fHelp || params.size() > 1)
throw runtime_error(
"getnewaddress ( \"account\" )\n"
"\nReturns a new " + strprintf("%s",komodo_chainname()) + " address for receiving payments.\n"
"\nReturns a new " + strprintf("%s",hush_chainname()) + " address for receiving payments.\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"
"\nResult:\n"
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) The new " + strprintf("%s",komodo_chainname()) + " address\n"
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) The new " + strprintf("%s",hush_chainname()) + " address\n"
"\nExamples:\n"
+ HelpExampleCli("getnewaddress", "")
+ HelpExampleRpc("getnewaddress", "")
@@ -274,11 +274,11 @@ UniValue getaccountaddress(const UniValue& params, bool fHelp, const CPubKey& my
if (fHelp || params.size() != 1)
throw runtime_error(
"getaccountaddress \"account\"\n"
"\nDEPRECATED. Returns the current " + strprintf("%s",komodo_chainname()) + " address for receiving payments to this account.\n"
"\nDEPRECATED. Returns the current " + strprintf("%s",hush_chainname()) + " address for receiving payments to this account.\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"
"\nResult:\n"
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) The account " + strprintf("%s",komodo_chainname()) + " address\n"
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) The account " + strprintf("%s",hush_chainname()) + " address\n"
"\nExamples:\n"
+ HelpExampleCli("getaccountaddress", "")
+ HelpExampleCli("getaccountaddress", "\"\"")
@@ -306,7 +306,7 @@ UniValue getrawchangeaddress(const UniValue& params, bool fHelp, const CPubKey&
if (fHelp || params.size() > 1)
throw runtime_error(
"getrawchangeaddress\n"
"\nReturns a new " + strprintf("%s",komodo_chainname()) + " address, for receiving change.\n"
"\nReturns a new " + strprintf("%s",hush_chainname()) + " address, for receiving change.\n"
"This is for use with raw transactions, NOT normal use.\n"
"\nResult:\n"
"\"address\" (string) The address\n"
@@ -340,10 +340,10 @@ UniValue setaccount(const UniValue& params, bool fHelp, const CPubKey& mypk)
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"setaccount \"" + strprintf("%s",komodo_chainname()) + "_address\" \"account\"\n"
"setaccount \"" + strprintf("%s",hush_chainname()) + "_address\" \"account\"\n"
"\nDEPRECATED. Sets the account associated with the given address.\n"
"\nArguments:\n"
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address to be associated with an account.\n"
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " 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"
"\nExamples:\n"
+ HelpExampleCli("setaccount", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" \"tabby\"")
@@ -386,10 +386,10 @@ UniValue getaccount(const UniValue& params, bool fHelp, const CPubKey& mypk)
if (fHelp || params.size() != 1)
throw runtime_error(
"getaccount \"" + strprintf("%s",komodo_chainname()) + "_address\"\n"
"getaccount \"" + strprintf("%s",hush_chainname()) + "_address\"\n"
"\nDEPRECATED. Returns the account associated with the given address.\n"
"\nArguments:\n"
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address for account lookup.\n"
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address for account lookup.\n"
"\nResult:\n"
"\"accountname\" (string) the account address\n"
"\nExamples:\n"
@@ -426,7 +426,7 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp, const CPubKey
"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"
"[ (json array of string)\n"
" \"" + strprintf("%s",komodo_chainname()) + "_address\" (string) a " + strprintf("%s",komodo_chainname()) + " address associated with the given account\n"
" \"" + strprintf("%s",hush_chainname()) + "_address\" (string) a " + strprintf("%s",hush_chainname()) + " address associated with the given account\n"
" ,...\n"
"]\n"
"\nExamples:\n"
@@ -502,19 +502,19 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
if (fHelp || params.size() < 2 || params.size() > 5)
throw runtime_error(
"sendtoaddress \"" + strprintf("%s",komodo_chainname()) + "_address\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
"sendtoaddress \"" + strprintf("%s",hush_chainname()) + "_address\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
"\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
+ HelpRequiringPassphrase() +
"\nArguments:\n"
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address to send to.\n"
"2. \"amount\" (numeric, required) The amount in " + strprintf("%s",komodo_chainname()) + " to send. eg 0.1\n"
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address to send to.\n"
"2. \"amount\" (numeric, required) The amount in " + strprintf("%s",hush_chainname()) + " to send. eg 0.1\n"
"3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
" This is not part of the transaction, just kept in your wallet.\n"
"4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n"
" to which you're sending the transaction. This is not part of the \n"
" transaction, just kept in your wallet.\n"
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
" The recipient will receive less " + strprintf("%s",komodo_chainname()) + " than you enter in the amount field.\n"
" The recipient will receive less " + strprintf("%s",hush_chainname()) + " than you enter in the amount field.\n"
"\nResult:\n"
"\"transactionid\" (string) The transaction id.\n"
"\nExamples:\n"
@@ -528,7 +528,7 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
{
if ( hush_isnotaryvout((char *)params[0].get_str().c_str(),chainActive.LastTip()->nTime) == 0 )
{
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid " + strprintf("%s",komodo_chainname()) + " address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid " + strprintf("%s",hush_chainname()) + " address");
}
}
LOCK2(cs_main, pwalletMain->cs_wallet);
@@ -570,7 +570,6 @@ UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk)
uint64_t PAX_fiatdest(uint64_t *seedp,int32_t tokomodo,char *destaddr,uint8_t pubkey37[37],char *coinaddr,int32_t height,char *base,int64_t fiatoshis);
int32_t komodo_opreturnscript(uint8_t *script,uint8_t type,uint8_t *opret,int32_t opretlen);
extern int32_t KOMODO_PAX;
extern uint64_t KOMODO_INTERESTSUM,KOMODO_WALLETBALANCE;
int32_t komodo_is_issuer();
int32_t dragon_rwnum(int32_t rwflag,uint8_t *serialized,int32_t len,void *endianedp);
int32_t komodo_isrealtime(int32_t *kmdheightp);
@@ -734,7 +733,7 @@ UniValue paxdeposit(const UniValue& params, bool fHelp, const CPubKey& mypk)
throw runtime_error("paxdeposit disabled without -pax");
}
if ( komodo_is_issuer() != 0 )
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "paxdeposit only from KMD");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "paxdeposit only from KYC");
if (!EnsureWalletIsAvailable(fHelp))
throw runtime_error("paxdeposit needs wallet"); //return Value::null;
if (fHelp || params.size() != 3)
@@ -821,8 +820,8 @@ UniValue listaddressgroupings(const UniValue& params, bool fHelp, const CPubKey&
"[\n"
" [\n"
" [\n"
" \"" + strprintf("%s",komodo_chainname()) + " address\", (string) The " + strprintf("%s",komodo_chainname()) + " address\n"
" amount, (numeric) The amount in " + strprintf("%s",komodo_chainname()) + "\n"
" \"" + strprintf("%s",hush_chainname()) + " address\", (string) The " + strprintf("%s",hush_chainname()) + " address\n"
" amount, (numeric) The amount in " + strprintf("%s",hush_chainname()) + "\n"
" \"account\" (string, optional) The account (DEPRECATED)\n"
" ]\n"
" ,...\n"
@@ -923,13 +922,13 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp, const CPubKey&
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"getreceivedbyaddress \"" + strprintf("%s",komodo_chainname()) + "_address\" ( minconf )\n"
"\nReturns the total amount received by the given " + strprintf("%s",komodo_chainname()) + " address in transactions with at least minconf confirmations.\n"
"getreceivedbyaddress \"" + strprintf("%s",hush_chainname()) + "_address\" ( minconf )\n"
"\nReturns the total amount received by the given " + strprintf("%s",hush_chainname()) + " address in transactions with at least minconf confirmations.\n"
"\nArguments:\n"
"1. \"" + strprintf("%s",komodo_chainname()) + "_address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address for transactions.\n"
"1. \"" + strprintf("%s",hush_chainname()) + "_address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address for transactions.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"\nResult:\n"
"amount (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received at this address.\n"
"amount (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received at this address.\n"
"\nExamples:\n"
"\nThe amount from transactions with at least 1 confirmation\n"
+ HelpExampleCli("getreceivedbyaddress", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\"") +
@@ -1000,7 +999,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp, const CPubKey&
"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"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"\nResult:\n"
"amount (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received for this account.\n"
"amount (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received for this account.\n"
"\nExamples:\n"
"\nAmount received by the default account with at least 1 confirmation\n"
+ HelpExampleCli("getreceivedbyaccount", "\"\"") +
@@ -1099,7 +1098,7 @@ UniValue cleanwallettransactions(const UniValue& params, bool fHelp, const CPubK
"1. \"txid\" (string, optional) The transaction id to keep.\n"
"\nResult:\n"
"{\n"
" \"total_transactions\" : n, (numeric) Transactions in wallet of " + strprintf("%s",komodo_chainname()) + "\n"
" \"total_transactions\" : n, (numeric) Transactions in wallet of " + strprintf("%s",hush_chainname()) + "\n"
" \"remaining_transactions\" : n, (numeric) Transactions in wallet after clean.\n"
" \"removed_transactions\" : n, (numeric) The number of transactions removed.\n"
"}\n"
@@ -1202,7 +1201,7 @@ UniValue getbalance(const UniValue& params, bool fHelp, const CPubKey& mypk)
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
"\nResult:\n"
"amount (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received for this account.\n"
"amount (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received for this account.\n"
"\nExamples:\n"
"\nThe total amount in the wallet\n"
+ HelpExampleCli("getbalance", "") +
@@ -1298,15 +1297,15 @@ UniValue movecmd(const UniValue& params, bool fHelp, const CPubKey& mypk)
"\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"
"2. \"toaccount\" (string, required) MUST be set to the empty string \"\" to represent the default account. Passing any other string will result in an error.\n"
"3. amount (numeric) Quantity of " + strprintf("%s",komodo_chainname()) + " to move between accounts.\n"
"3. amount (numeric) Quantity of " + strprintf("%s",hush_chainname()) + " to move between accounts.\n"
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
"5. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n"
"\nResult:\n"
"true|false (boolean) true if successful.\n"
"\nExamples:\n"
"\nMove 0.01 " + strprintf("%s",komodo_chainname()) + " from the default account to the account named tabby\n"
"\nMove 0.01 " + strprintf("%s",hush_chainname()) + " from the default account to the account named tabby\n"
+ HelpExampleCli("move", "\"\" \"tabby\" 0.01") +
"\nMove 0.01 " + strprintf("%s",komodo_chainname()) + " timotei to akiko with a comment and funds have 6 confirmations\n"
"\nMove 0.01 " + strprintf("%s",hush_chainname()) + " timotei to akiko with a comment and funds have 6 confirmations\n"
+ HelpExampleCli("move", "\"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"") +
"\nAs a json rpc call\n"
+ HelpExampleRpc("move", "\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"")
@@ -1368,14 +1367,14 @@ UniValue sendfrom(const UniValue& params, bool fHelp, const CPubKey& mypk)
if (fHelp || params.size() < 3 || params.size() > 6)
throw runtime_error(
"sendfrom \"fromaccount\" \"to" + strprintf("%s",komodo_chainname()) + "address\" amount ( minconf \"comment\" \"comment-to\" )\n"
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a " + strprintf("%s",komodo_chainname()) + " address.\n"
"sendfrom \"fromaccount\" \"to" + strprintf("%s",hush_chainname()) + "address\" amount ( minconf \"comment\" \"comment-to\" )\n"
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a " + strprintf("%s",hush_chainname()) + " address.\n"
"The amount is a real and is rounded to the nearest 0.00000001."
+ HelpRequiringPassphrase() + "\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"
"2. \"to" + strprintf("%s",komodo_chainname()) + "address\" (string, required) The " + strprintf("%s",komodo_chainname()) + " address to send funds to.\n"
"3. amount (numeric, required) The amount in " + strprintf("%s",komodo_chainname()) + " (transaction fee is added on top).\n"
"2. \"to" + strprintf("%s",hush_chainname()) + "address\" (string, required) The " + strprintf("%s",hush_chainname()) + " address to send funds to.\n"
"3. amount (numeric, required) The amount in " + strprintf("%s",hush_chainname()) + " (transaction fee is added on top).\n"
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
" This is not part of the transaction, just kept in your wallet.\n"
@@ -1385,7 +1384,7 @@ UniValue sendfrom(const UniValue& params, bool fHelp, const CPubKey& mypk)
"\nResult:\n"
"\"transactionid\" (string) The transaction id.\n"
"\nExamples:\n"
"\nSend 0.01 " + strprintf("%s",komodo_chainname()) + " from the default account to the address, must have at least 1 confirmation\n"
"\nSend 0.01 " + strprintf("%s",hush_chainname()) + " from the default account to the address, must have at least 1 confirmation\n"
+ HelpExampleCli("sendfrom", "\"\" \"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" 0.01") +
"\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
+ HelpExampleCli("sendfrom", "\"tabby\" \"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" 0.01 6 \"donation\" \"seans outpost\"") +
@@ -1443,14 +1442,14 @@ UniValue sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
"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"
" {\n"
" \"address\":amount (numeric) The " + strprintf("%s",komodo_chainname()) + " address is the key, the numeric amount in " + strprintf("%s",komodo_chainname()) + " is the value\n"
" \"address\":amount (numeric) The " + strprintf("%s",hush_chainname()) + " address is the key, the numeric amount in " + strprintf("%s",hush_chainname()) + " is the value\n"
" ,...\n"
" }\n"
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
"4. \"comment\" (string, optional) A comment\n"
"5. subtractfeefromamount (string, optional) A json array with addresses.\n"
" The fee will be equally deducted from the amount of each selected address.\n"
" Those recipients will receive less " + strprintf("%s",komodo_chainname()) + " than you enter in their corresponding amount field.\n"
" Those recipients will receive less " + strprintf("%s",hush_chainname()) + " than you enter in their corresponding amount field.\n"
" If no addresses are specified here, the sender pays the fee.\n"
" [\n"
" \"address\" (string) Subtract fee from this address\n"
@@ -1554,20 +1553,20 @@ UniValue addmultisigaddress(const UniValue& params, bool fHelp, const CPubKey& m
{
string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
"Each key is a " + strprintf("%s",komodo_chainname()) + " address or hex-encoded public key.\n"
"Each key is a " + strprintf("%s",hush_chainname()) + " address or hex-encoded public key.\n"
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
"\nArguments:\n"
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
"2. \"keysobject\" (string, required) A json array of " + strprintf("%s",komodo_chainname()) + " addresses or hex-encoded public keys\n"
"2. \"keysobject\" (string, required) A json array of " + strprintf("%s",hush_chainname()) + " addresses or hex-encoded public keys\n"
" [\n"
" \"address\" (string) " + strprintf("%s",komodo_chainname()) + " address or hex-encoded public key\n"
" \"address\" (string) " + strprintf("%s",hush_chainname()) + " address or hex-encoded public key\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"
"\nResult:\n"
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) A " + strprintf("%s",komodo_chainname()) + " address associated with the keys.\n"
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) A " + strprintf("%s",hush_chainname()) + " address associated with the keys.\n"
"\nExamples:\n"
"\nAdd a multisig address from 2 addresses\n"
@@ -1760,7 +1759,7 @@ UniValue listreceivedbyaddress(const UniValue& params, bool fHelp, const CPubKey
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
" \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n"
" \"amount\" : x.xxx, (numeric) The total amount in " + strprintf("%s",komodo_chainname()) + " received by the address\n"
" \"amount\" : x.xxx, (numeric) The total amount in " + strprintf("%s",hush_chainname()) + " received by the address\n"
" \"confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n"
" }\n"
" ,...\n"
@@ -1939,17 +1938,17 @@ UniValue listtransactions(const UniValue& params, bool fHelp, const CPubKey& myp
" {\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
" It will be \"\" for the default account.\n"
" \"address\":\"" + strprintf("%s",komodo_chainname()) + "_address\", (string) The " + strprintf("%s",komodo_chainname()) + " address of the transaction. Not present for \n"
" \"address\":\"" + strprintf("%s",hush_chainname()) + "_address\", (string) The " + strprintf("%s",hush_chainname()) + " address of the transaction. Not present for \n"
" move transactions (category = move).\n"
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
" transaction between accounts, and not associated with an address,\n"
" transaction id or block. 'send' and 'receive' transactions are \n"
" associated with an address, transaction id and block details\n"
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",komodo_chainname()) + ". This is negative for the 'send' category, and for the\n"
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",hush_chainname()) + ". This is negative for the 'send' category, and for the\n"
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
" and for the 'move' category for inbound funds.\n"
" \"vout\" : n, (numeric) the vout value\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",komodo_chainname()) + ". This is negative and only available for the \n"
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",hush_chainname()) + ". This is negative and only available for the \n"
" 'send' category of transactions.\n"
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
" 'receive' category of transactions.\n"
@@ -2142,12 +2141,12 @@ UniValue listsinceblock(const UniValue& params, bool fHelp, const CPubKey& mypk)
"{\n"
" \"transactions\": [\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
" \"address\":\"" + strprintf("%s",komodo_chainname()) + "_address\", (string) The " + strprintf("%s",komodo_chainname()) + " address of the transaction. Not present for move transactions (category = move).\n"
" \"address\":\"" + strprintf("%s",hush_chainname()) + "_address\", (string) The " + strprintf("%s",hush_chainname()) + " address of the transaction. Not present for move transactions (category = move).\n"
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",komodo_chainname()) + ". This is negative for the 'send' category, and for the 'move' category for moves \n"
" \"amount\": x.xxx, (numeric) The amount in " + strprintf("%s",hush_chainname()) + ". This is negative for the 'send' category, and for the 'move' category for moves \n"
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
" \"vout\" : n, (numeric) the vout value\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",komodo_chainname()) + ". This is negative and only available for the 'send' category of transactions.\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in " + strprintf("%s",hush_chainname()) + ". This is negative and only available for the 'send' category of transactions.\n"
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
" \"blockindex\": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
@@ -2230,7 +2229,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp, const CPubKey& mypk)
"2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
"\nResult:\n"
"{\n"
" \"amount\" : x.xxx, (numeric) The transaction amount in " + strprintf("%s",komodo_chainname()) + "\n"
" \"amount\" : x.xxx, (numeric) The transaction amount in " + strprintf("%s",hush_chainname()) + "\n"
" \"confirmations\" : n, (numeric) The number of confirmations\n"
" \"blockhash\" : \"hash\", (string) The block hash\n"
" \"blockindex\" : xx, (numeric) The block index\n"
@@ -2241,9 +2240,9 @@ UniValue gettransaction(const UniValue& params, bool fHelp, const CPubKey& mypk)
" \"details\" : [\n"
" {\n"
" \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
" \"address\" : \"" + strprintf("%s",komodo_chainname()) + "_address\", (string) The " + strprintf("%s",komodo_chainname()) + " address involved in the transaction\n"
" \"address\" : \"" + strprintf("%s",hush_chainname()) + "_address\", (string) The " + strprintf("%s",hush_chainname()) + " address involved in the transaction\n"
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
" \"amount\" : x.xxx (numeric) The amount in " + strprintf("%s",komodo_chainname()) + "\n"
" \"amount\" : x.xxx (numeric) The amount in " + strprintf("%s",hush_chainname()) + "\n"
" \"vout\" : n, (numeric) the vout value\n"
" }\n"
" ,...\n"
@@ -2401,7 +2400,7 @@ UniValue walletpassphrase(const UniValue& params, bool fHelp, const CPubKey& myp
throw runtime_error(
"walletpassphrase \"passphrase\" timeout\n"
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
"This is needed prior to performing transactions related to private keys such as sending " + strprintf("%s",komodo_chainname()) + "\n"
"This is needed prior to performing transactions related to private keys such as sending " + strprintf("%s",hush_chainname()) + "\n"
"\nArguments:\n"
"1. \"passphrase\" (string, required) The wallet passphrase\n"
"2. timeout (numeric, required) The time to keep the decryption key in seconds.\n"
@@ -2569,10 +2568,10 @@ UniValue encryptwallet(const UniValue& params, bool fHelp, const CPubKey& mypk)
"\nExamples:\n"
"\nEncrypt you wallet\n"
+ HelpExampleCli("encryptwallet", "\"my pass phrase\"") +
"\nNow set the passphrase to use the wallet, such as for signing or sending " + strprintf("%s",komodo_chainname()) + "\n"
"\nNow set the passphrase to use the wallet, such as for signing or sending " + strprintf("%s",hush_chainname()) + "\n"
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
"\nNow we can so something like sign\n"
+ HelpExampleCli("signmessage", "\"" + strprintf("%s",komodo_chainname()) + "_address\" \"test message\"") +
+ HelpExampleCli("signmessage", "\"" + strprintf("%s",hush_chainname()) + "_address\" \"test message\"") +
"\nNow lock the wallet again by removing the passphrase\n"
+ HelpExampleCli("walletlock", "") +
"\nAs a json rpc call\n"
@@ -2620,7 +2619,7 @@ UniValue lockunspent(const UniValue& params, bool fHelp, const CPubKey& mypk)
"lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
"\nUpdates list of temporarily unspendable outputs.\n"
"Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
"A locked transaction output will not be chosen by automatic coin selection, when spending " + strprintf("%s",komodo_chainname()) + ".\n"
"A locked transaction output will not be chosen by automatic coin selection, when spending " + strprintf("%s",hush_chainname()) + ".\n"
"Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
"is always cleared (by virtue of process exit) when a node stops or fails.\n"
"Also see the listunspent call\n"
@@ -2753,7 +2752,7 @@ UniValue settxfee(const UniValue& params, bool fHelp, const CPubKey& mypk)
"settxfee amount\n"
"\nSet the transaction fee per kB.\n"
"\nArguments:\n"
"1. amount (numeric, required) The transaction fee in " + strprintf("%s",komodo_chainname()) + "/kB rounded to the nearest 0.00000001\n"
"1. amount (numeric, required) The transaction fee in " + strprintf("%s",hush_chainname()) + "/kB rounded to the nearest 0.00000001\n"
"\nResult\n"
"true|false (boolean) Returns true if successful\n"
"\nExamples:\n"
@@ -2782,9 +2781,9 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
"\nResult:\n"
"{\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + strprintf("%s",komodo_chainname()) + "\n"
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + strprintf("%s",komodo_chainname()) + "\n"
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + strprintf("%s",komodo_chainname()) + "\n"
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + strprintf("%s",hush_chainname()) + "\n"
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + strprintf("%s",hush_chainname()) + "\n"
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + strprintf("%s",hush_chainname()) + "\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"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
@@ -2861,9 +2860,9 @@ UniValue listunspent(const UniValue& params, bool fHelp, const CPubKey& mypk)
"\nArguments:\n"
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
"3. \"addresses\" (string) A json array of " + strprintf("%s",komodo_chainname()) + " addresses to filter\n"
"3. \"addresses\" (string) A json array of " + strprintf("%s",hush_chainname()) + " addresses to filter\n"
" [\n"
" \"address\" (string) " + strprintf("%s",komodo_chainname()) + " address\n"
" \"address\" (string) " + strprintf("%s",hush_chainname()) + " address\n"
" ,...\n"
" ]\n"
"\nResult\n"
@@ -3841,7 +3840,7 @@ UniValue z_getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk
"\nArguments:\n"
"1. \"type\" (string, optional, default=\"" + defaultType + "\") The type of address. Either "+ ADDR_TYPE_SAPLING + " or " + ADDR_TYPE_AMNESIA + " .\n"
"\nResult:\n"
"\"" + strprintf("%s",komodo_chainname()) + "_address\" (string) The new shielded address.\n"
"\"" + strprintf("%s",hush_chainname()) + "_address\" (string) The new shielded address.\n"
"\nExamples:\n"
+ HelpExampleCli("z_getnewaddress", "")
+ HelpExampleCli("z_getnewaddress", ADDR_TYPE_SAPLING)