upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main_gui.cpp13
-rw-r--r--src/walletcmd.h5
2 files changed, 18 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 1b72813..6164ad7 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -86,6 +86,8 @@ static void PrintUsage()
86 printf(" anyone, so guard it like cash)\n"); 86 printf(" anyone, so guard it like cash)\n");
87 printf(" /importwallet=FILE (load keys from such a file back in)\n"); 87 printf(" /importwallet=FILE (load keys from such a file back in)\n");
88 printf(" /newaddress (print the next receiving address, then exit)\n"); 88 printf(" /newaddress (print the next receiving address, then exit)\n");
89 printf(" /sendto=ADDRESS,AMOUNT (spend from this wallet, then exit -- the\n");
90 printf(" only way to send without the window)\n");
89 printf(" /newphrase (create a twelve-word recovery phrase for a\n"); 91 printf(" /newphrase (create a twelve-word recovery phrase for a\n");
90 printf(" wallet that has none, show it once, exit)\n"); 92 printf(" wallet that has none, show it once, exit)\n");
91 printf(" /restorephrase=\"WORDS\" (rebuild this wallet from a phrase and scan\n"); 93 printf(" /restorephrase=\"WORDS\" (rebuild this wallet from a phrase and scan\n");
@@ -388,6 +390,17 @@ int main(int argc, char* argv[])
388 return nRet; 390 return nRet;
389 } 391 }
390 392
393 // -sendto -- the counterpart to -newaddress. Without it a headless node can
394 // be paid and can never pay: SendMoney() has been here since 0.1.0 and only
395 // the window ever reached it.
396 string strSendTo = argval2(argc, argv, "/sendto", "-sendto");
397 if (!strSendTo.empty())
398 {
399 int nRet = CmdSendTo(strSendTo);
400 DBFlush(true);
401 return nRet;
402 }
403
391 if (arg(argc,argv,"/recoveryaudit") || arg(argc,argv,"-recoveryaudit")) 404 if (arg(argc,argv,"/recoveryaudit") || arg(argc,argv,"-recoveryaudit"))
392 { 405 {
393 int nRet = CmdRecoveryAudit(); 406 int nRet = CmdRecoveryAudit();
diff --git a/src/walletcmd.h b/src/walletcmd.h
index 796356b..69874e4 100644
--- a/src/walletcmd.h
+++ b/src/walletcmd.h
@@ -44,4 +44,9 @@ int CmdShowDerived(int nCount);
44// by the installed recovery phrase or still depends on wallet.dat-only keys. 44// by the installed recovery phrase or still depends on wallet.dat-only keys.
45int CmdRecoveryAudit(); 45int CmdRecoveryAudit();
46 46
47// Spend, from the command line. Until now the only way to send was the window,
48// so a headless node could be paid and could never pay -- it could hold a
49// balance it had no way to move. strArg is "ADDRESS,AMOUNT".
50int CmdSendTo(const std::string& strArg);
51
47#endif 52#endif