doc: update interface, –stdin flag, signtx (#31005) #33765

pull cobratbq wants to merge 1 commits into bitcoin:master from cobratbq:external-signer-docs changing 1 files +62 −24
  1. cobratbq commented at 11:24 pm on November 2, 2025: none

    Updates to documentation for External Signer.

    • Added mention that signtransaction command is no longer primary mechanism.
    • Document inter-process communication via --stdin flag followed with stdin-content.
    • Document signtx command followed by Base64-encoded PSBT.

    Best to squash commits when ready to merge.

  2. DrahtBot added the label Docs on Nov 2, 2025
  3. DrahtBot commented at 11:25 pm on November 2, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33765.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • “<txid” -> “” [placeholder missing closing ‘>’ making the example JSON look like a malformed/incorrect placeholder]
    • “With <name> one of main, test, signet, regtest.” -> “With <name> being one of main, test, signet, regtest.” [missing verb phrase; current fragment is grammatically incomplete]
    • “Indicate that (sub)command should be received over stdin and results returned in response to that.” -> “Indicate that the (sub)command should be received over stdin and results returned in response to that.” [missing definite article “the” before “(sub)command”, making the sentence slightly ungrammatical]

    2025-11-26

  4. in doc/external-signer.md:86 in 6f5fc6a949
    77@@ -78,6 +78,28 @@ Prerequisite knowledge:
    78 * [Output Descriptors](descriptors.md)
    79 * Partially Signed Bitcoin Transaction ([PSBT](psbt.md))
    80 
    81+### Flag `--stdin` (required)
    82+
    83+Usage:
    84+```
    85+$ <cmd> --stdin
    86+[…IPC interaction written to stdin…]
    


    Sjors commented at 11:13 am on November 11, 2025:

    The term “IPC” could be confused with our multiprocess integration, maybe just use the wording from hwi --help:

    --stdin Enter commands and arguments via stdin


    cobratbq commented at 10:01 pm on November 11, 2025:
    Makes sense. Will do. (FWIW, technically this is multi-process interop :-P)
  5. in doc/external-signer.md:95 in 6f5fc6a949
    90+
    91+```
    92+signtx "<Base64-encoded PSBT-content>"
    93+```
    94+
    95+`signtx` indicates a PSBT signing request, followed by Base64-encoded PSBT-content. Quotes are optional, added in more recent versions. Semantically there is no difference, as Base64-encoded content is an uninterrupted sequence of characters regardless.
    


    Sjors commented at 11:15 am on November 11, 2025:

    Afaik the use of quotes depends on the shell environment, I don’t think it’s worth documenting.

    More important is to point out that Bitcoin Core will use --stdin here, in order to support large PSBTs.


    cobratbq commented at 10:03 pm on November 11, 2025:
    This is content that is written to stdout, thus piped to external-signer. This is not part of the commandline, such that a shell might interfere or otherwise preprocess. Thus quotes are passed on as any other byte. Consequently, probably better to mention this.
  6. in doc/external-signer.md:121 in 6f5fc6a949
    119@@ -98,6 +120,8 @@ A future extension could add an optional return field `reachable`, in case `<cmd
    120 
    121 ### `signtransaction` (required)
    


    Sjors commented at 11:17 am on November 11, 2025:

    The original doc is wrong, there is only signtx, no signtransaction.

    signtx and its arguments, like all other commands, can optionally be passed via --stdin


    cobratbq commented at 10:05 pm on November 11, 2025:

    Is your comment that the doc is wrong, or that you moved away from that solution long ago? I only recently got involved with this side of Bitcoin, so I am really only familiar with v27+.

    I can drop the signtransaction shell command for the sake obsolescence regardless, but it would be nice to know.


    Sjors commented at 8:34 am on November 12, 2025:

    I don’t think there was ever a signtransaction, it was just a typo in the docs. The external signer feature was introduced in v22. The docs from that time mentions signtransaction and not signtx: https://github.com/bitcoin/bitcoin/blob/v22.0/doc/external-signer.md

    Looking at the code from v22.0 however, the actual command was already signtx.

  7. Sjors commented at 11:20 am on November 11, 2025: member
    Good idea to update these docs.
  8. cobratbq commented at 10:06 pm on November 11, 2025: none

    Good idea to update these docs.

    Yes … I was inspired by a certain #31005 (comment)

  9. cobratbq force-pushed on Nov 11, 2025
  10. in doc/external-signer.md:89 in e1d431cb2a
    84+```
    85+$ <cmd> --stdin
    86+[…command and arguments written to stdin…]
    87+```
    88+
    89+#### stdin-command `signtx` (required)
    


    Sjors commented at 8:37 am on November 12, 2025:

    signtx is not inherently stdin

    All (required) commands should work with or without --stdin. Bitcoin Core currently only uses it for signtx, and that’s worth mentioning, but it can change.


    cobratbq commented at 7:00 pm on November 12, 2025:

    Oookaaaaaay .. that changes things considerably. That was not at all clear to me.

    Any chance you can drop a link to the place in source-code (assuming it is somewhat concentrated), such that I can have a quick peek. I could search myself, but I suspect you are familiar with the code-base.



    cobratbq commented at 5:58 pm on November 26, 2025:
    yeah, sry, I had found it already. I realized that it essentially just concerns text being prepended, so it is mostly whoever “tells the story” on this API. I will make the changes, or have made; need to (re)check.
  11. cobratbq renamed this:
    doc: update interface, --stdin flag, IPC-command signtx (#31005)
    doc: update interface, --stdin flag, `signtx` (#31005)
    on Nov 17, 2025
  12. DrahtBot added the label CI failed on Nov 26, 2025
  13. maflcko commented at 2:29 pm on November 26, 2025: member

    Please use unique, descriptive commit message, or squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits.

    Also, there are a few LLM linter comments. Not sure if they all apply, but the missing a article makes sense.

  14. doc: external signer: update interface, --stdin flag, IPC-command signtx, contains updates from #33947 94a26e8fa2
  15. cobratbq force-pushed on Nov 26, 2025
  16. cobratbq commented at 7:14 pm on November 26, 2025: none
    @maflcko I expected that someone would squash upon integrating the work. Now squashed. I included some of the changes from #33947, though not verbatim. It may be worth checking the changes again, as a whole.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-27 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me