From 4fdd4d8d29f15cc0b2e76443733a74a41070e681 Mon Sep 17 00:00:00 2001 From: woltx <94266259+w0xlt@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:18:55 -0700 Subject: [PATCH] doc: replace stale signtransaction wording with current signtx flow The protocol documentation still described a "signtransaction" command driven by sendtoaddress and sendmany. Those RPCs never gained external signer support: it was effectively precluded by #21201, which was merged a few days before external signer support landed in #16546, so the interaction was missed in review (#33112 has a commit making the rejection explicit). Spending from an external signer wallet uses send/sendall (and bumpfee for fee-bumping), which invoke the signer with ` --stdin` and pass the `signtx` subcommand and PSBT over stdin. Update the spending example and the protocol description accordingly, using `bitcoin rpc` for the example since it enables -named by default. --- doc/external-signer.md | 6 ++---- src/external_signer.h | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/external-signer.md b/doc/external-signer.md index d777871d7da..de5e5b5aba8 100644 --- a/doc/external-signer.md +++ b/doc/external-signer.md @@ -67,7 +67,7 @@ Replace `
` with the result of `getnewaddress`. Under the hood this uses a [PSBT (Partially Signed Bitcoin Transaction)](psbt.md). ```sh -bitcoin-cli -rpcwallet= sendtoaddress
+bitcoin rpc -rpcwallet= send outputs='{"
": }' ``` This constructs a PSBT and prompts your external signer to sign (will fail if it's not connected). If successful, Bitcoin Core finalizes and broadcasts the transaction. @@ -218,6 +218,4 @@ It then imports descriptors for all supported address types, in a BIP44/49/84/86 The `walletdisplayaddress` RPC reuses some code from `getaddressinfo` on the provided address and obtains the inferred descriptor. It then calls ` --fingerprint=00000000 displayaddress --desc=`. -For external-signer wallets, spending uses `send` or `sendall`. Bitcoin Core builds a PSBT, calls the signer via stdin with `signtx`, and if signatures are sufficient, finalizes and broadcasts the transaction. If the signer is not connected or cancels, the call fails with an error. For fee-bumping on such wallets, use `psbtbumpfee` to involve an external signer. - -`sendtoaddress` and `sendmany` check `inputs->bip32_derivs` to see if any inputs have the same `master_fingerprint` as the signer. If so, it calls ` --fingerprint=00000000 signtransaction `. It waits for the device to return a (partially) signed psbt, tries to finalize it and broadcasts the transaction. +For external-signer wallets, spending uses `send` or `sendall`, and fee-bumping uses `bumpfee`. Bitcoin Core builds a PSBT, adds key origin information, checks whether any input key origin fingerprint matches the signer, calls ` --stdin --fingerprint 00000000 --chain `, and sends `signtx ` over stdin. If signatures are sufficient, it finalizes the transaction and, for broadcasting RPCs, broadcasts it. If signing cannot complete, the call fails with an error. For manual fee-bumping, use `psbtbumpfee` to obtain a PSBT for signing. diff --git a/src/external_signer.h b/src/external_signer.h index 87fbbf0b8c2..a6f16e8e8ac 100644 --- a/src/external_signer.h +++ b/src/external_signer.h @@ -58,7 +58,8 @@ public: UniValue GetDescriptors(int account); //! Sign PartiallySignedTransaction on the device. - //! Calls ` signtransaction` and passes the PSBT via stdin. + //! Calls ` --stdin --fingerprint --chain ` and passes the + //! `signtx` command and PSBT via stdin. //! @param[in,out] psbt PartiallySignedTransaction to be signed bool SignTransaction(PartiallySignedTransaction& psbt, std::string& error); };