Skip to content
Bitcoin Roots

v29.4-roots.4 · Commit 27: [PATCH 27/37] docs(wallet): document advanced privacy tools

src/wallet/rpc/spend.cpp

Before: src/wallet/rpc/spend.cpp · After: src/wallet/rpc/spend.cpp

File metadata
index ea29d8fd2b11d5ac79e7f4ffdf6ef4a39a88d6c4..a20946e2b434d26aa228846d364e25aaa9bb22ee 100644

Download original patch · Release notes

Diff rows 1–30 of 30. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/wallet/rpc/spend.cpp CHANGED
@@ -36,12 +36,17 @@ namespace wallet {
36
36
  RPCHelpMan sweepprivkeys()
37
37
  {
38
38
  return RPCHelpMan{"sweepprivkeys",
39
- "Sweep confirmed UTXOs for supplied private keys to an address already controlled by this wallet.\n"
40
- "Supplied keys are never imported or saved. Set broadcast to true only after reviewing a preview.\n",
39
+ "Sweep confirmed UTXOs from supplied Base58 WIF private keys to a spendable address in this wallet.\n"
40
+ "All valid WIF keys support P2PKH. Compressed keys also support native P2WPKH and wrapped P2SH-P2WPKH. "
41
+ "Taproot and other script forms are not scanned.\n"
42
+ "The destination must be controlled and spendable by this selected wallet; watch-only and private-key-disabled wallets are rejected. "
43
+ "Supplied keys are never imported or saved. Keep an independent backup until the transaction confirms.\n"
44
+ "With broadcast=false (the default), the result is a signed preview and no transaction is submitted. The fee reflects current wallet fee settings and chain state. "
45
+ "Set broadcast=true only after reviewing a fresh preview; broadcast can fail if inputs, fee policy, or chain state changed.\n",
41
46
  {
42
- {"privkeys", RPCArg::Type::ARR, RPCArg::Optional::NO, "Base58-encoded private keys", {{"privatekey", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "private key"}}},
43
- {"destination", RPCArg::Type::STR, RPCArg::Optional::NO, "An address controlled by this wallet"},
44
- {"broadcast", RPCArg::Type::BOOL, RPCArg::Default{false}, "Broadcast the signed transaction instead of returning a preview"},
47
+ {"privkeys", RPCArg::Type::ARR, RPCArg::Optional::NO, "Valid Base58 WIF private keys", {{"privatekey", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "private key"}}},
48
+ {"destination", RPCArg::Type::STR, RPCArg::Optional::NO, "A spendable address controlled by this selected wallet"},
49
+ {"broadcast", RPCArg::Type::BOOL, RPCArg::Default{false}, "Submit the signed transaction after a preview has been reviewed"},
45
50
  },
46
51
  RPCResult{RPCResult::Type::OBJ, "", "", {
47
52
  {RPCResult::Type::STR_HEX, "hex", "Signed transaction"},
@@ -49,7 +54,7 @@ RPCHelpMan sweepprivkeys()
49
54
  {RPCResult::Type::STR_AMOUNT, "amount", "Total value of swept inputs"},
50
55
  {RPCResult::Type::STR_AMOUNT, "fee", "Transaction fee"},
51
56
  {RPCResult::Type::NUM, "inputs", "Number of swept inputs"},
52
- {RPCResult::Type::BOOL, "broadcast", "Whether the transaction was broadcast"},
57
+ {RPCResult::Type::BOOL, "broadcast", "Whether the transaction was submitted for broadcast"},
53
58
  }},
54
59
  RPCExamples{HelpExampleCli("sweepprivkeys", "'[\"cV...\"]' bcrt1... false")},
55
60
  [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {