This introduces two command line flags (-addresstype and -changetype) which control
the type of addresses/outputs created by the GUI and RPCs. Certain RPCs allow
overriding these (`getnewaddress` and `getrawchangeaddress`). Supported types
are "legacy" (P2PKH and P2SH-multisig), "p2sh-segwit" (P2SH-P2WPKH and P2SH-P2WSH-multisig),
and "bech32" (P2WPKH and P2WSH-multisig).
A few utility functions are added to the wallet to construct different address type
and to add the necessary entries to the wallet file to be compatible with earlier
versions (see `CWallet::LearnRelatedScripts`, `GetDestinationForKey`,
`GetAllDestinationsForKey`, `CWallet::AddAndGetDestinationForScript`).
strUsage+=HelpMessageOpt("-addresstype",strprintf(_("What type of addresses to use (\"legacy\", \"p2sh-segwit\", or \"bech32\", default: \"%s\")"),FormatOutputType(OUTPUT_TYPE_DEFAULT)));
strUsage+=HelpMessageOpt("-changetype",_("What type of change to use (\"legacy\", \"p2sh-segwit\", or \"bech32\", default is same as -addresstype)"));
strUsage+=HelpMessageOpt("-disablewallet",_("Do not load the wallet and disable wallet RPC calls"));
strUsage+=HelpMessageOpt("-disablewallet",_("Do not load the wallet and disable wallet RPC calls"));
strUsage+=HelpMessageOpt("-keypool=<n>",strprintf(_("Set key pool size to <n> (default: %u)"),DEFAULT_KEYPOOL_SIZE));
strUsage+=HelpMessageOpt("-keypool=<n>",strprintf(_("Set key pool size to <n> (default: %u)"),DEFAULT_KEYPOOL_SIZE));
strUsage+=HelpMessageOpt("-fallbackfee=<amt>",strprintf(_("A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)"),
strUsage+=HelpMessageOpt("-fallbackfee=<amt>",strprintf(_("A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)"),
"\nReturns a new Bitcoin address for receiving payments.\n"
"\nReturns a new Bitcoin address for receiving payments.\n"
"If 'account' is specified (DEPRECATED), it is added to the address book \n"
"If 'account' is specified (DEPRECATED), it is added to the address book \n"
"so payments received with the address will be credited to 'account'.\n"
"so payments received with the address will be credited to 'account'.\n"
"\nArguments:\n"
"\nArguments:\n"
"1. \"account\" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n"
"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"
"2. \"address_type\" (string, optional) The address type to use. Options are \"legacy\", \"p2sh\", and \"bech32\". Default is set by -addresstype.\n"