rpc: load PSBT from file #17065

issue Sjors opened this issue on October 6, 2019
  1. Sjors commented at 8:40 AM on October 6, 2019: member

    Is your feature request related to a problem? Please describe.

    It's not possible to inspect a binary PSBT file generated by e.g. ColdCard.

    Describe the solution you'd like

    RPC calls like decodepsbt and analyzepsbt should have a file path argument.

    Describe alternatives you've considered

    A new RPC call like loadpsbt could have a file argument and return the base64 encoded version, that the user can then copy-paste into the existing RPC calls.

    cc @achow101

  2. Sjors added the label Feature on Oct 6, 2019
  3. fanquake added the label RPC/REST/ZMQ on Oct 6, 2019
  4. emilengler commented at 5:13 PM on October 6, 2019: contributor

    I prefer the second solution. It is more modular which I personally prefer (Unix fanboy).

    the user can then copy-paste into the existing RPC calls. Copy and pasting is not needed

    decodepsbt(loadpsbt('foo.bar'))
    
  5. Sjors commented at 7:07 PM on October 6, 2019: member

    @emilengler we don't supported nested RPC calls like that. It's a bit more verbose:

    bitcoin-cli getblockheader(getbestblockhash)
    -bash: syntax error near unexpected token `('
    
    bitcoin-cli getblockheader `bitcoin-cli getbestblockhash`
    

    It's worse when the inner RPC call returns a JSON object.

  6. promag commented at 8:11 PM on October 6, 2019: member

    This implies the file is on the server side, not very R(emote)PC friendly?

  7. emilengler commented at 11:22 PM on October 6, 2019: contributor

    @Sjors In the Qt console I can do

    getblock(getblockhash(10))
    

    Not sure about bitcoin-cli

  8. Sjors commented at 12:29 PM on January 6, 2021: member

    A good enough alternative might be to use cat tx.psbt | bitcoin -stdin decodepsbt

  9. Sjors closed this on Jan 6, 2021

  10. DrahtBot locked this on Aug 18, 2022

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: 2026-04-13 15:14 UTC

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