Skip to content
Bitcoin Roots

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