MCPcopy Create free account
hub / github.com/ElementsProject/elements / SetupWalletToolArgs

Function SetupWalletToolArgs

src/bitcoin-wallet.cpp:30–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28UrlDecodeFn* const URL_DECODE = nullptr;
29
30static void SetupWalletToolArgs(ArgsManager& argsman)
31{
32 SetupHelpOptions(argsman);
33 SetupChainParamsBaseOptions(argsman);
34
35 argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
36 argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
37 argsman.AddArg("-wallet=<wallet-name>", "Specify wallet name", ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::OPTIONS);
38 argsman.AddArg("-dumpfile=<file name>", "When used with 'dump', writes out the records to this file. When used with 'createfromdump', loads the records into a new wallet.", ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_NEGATION, OptionsCategory::OPTIONS);
39 argsman.AddArg("-debug=<category>", "Output debugging information (default: 0).", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
40 argsman.AddArg("-descriptors", "Create descriptors wallet. Only for 'create'", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
41 argsman.AddArg("-legacy", "Create legacy wallet. Only for 'create'", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
42 argsman.AddArg("-format=<format>", "The format of the wallet file to create. Either \"bdb\" or \"sqlite\". Only used with 'createfromdump'", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
43 argsman.AddArg("-printtoconsole", "Send trace/debug info to console (default: 1 when no -debug is true, 0 otherwise).", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
44
45 argsman.AddCommand("info", "Get wallet info");
46 argsman.AddCommand("create", "Create new wallet file");
47 argsman.AddCommand("salvage", "Attempt to recover private keys from a corrupt wallet. Warning: 'salvage' is experimental.");
48 argsman.AddCommand("dump", "Print out all of the wallet key-value records");
49 argsman.AddCommand("createfromdump", "Create new wallet file from dumped records");
50}
51
52static bool WalletAppInit(ArgsManager& args, int argc, char* argv[])
53{

Callers 1

WalletAppInitFunction · 0.85

Calls 4

SetupHelpOptionsFunction · 0.85
AddArgMethod · 0.80
AddCommandMethod · 0.80

Tested by

no test coverage detected