This is a tool to trim Bitcoin PSBTs (Partially Signed Bitcoin Transactions) down to a smaller size by removing unnecessary info.
Only me. Unless you can audit the code (including the changes I made in the python libraries copied from f469-disco), you should not use this. It could maliciously alter the PSBT (to send your coins to me, for example).
With your base64-encoded PSBT in a file, run:
$ ./trim_psbt.py < my-psbt.txt > trimmed-psbt.txt
For each input that has both non_witness_utxo
and witness_utxo
input data, it will remove the non_witness_utxo
.
My PSBT use case is offline signing via printed QR codes. The
non_witness_utxo
can be huge, and is only there to work around a
minor security issue.
See Trezor's blog and the Bitcoin Core response.
As long as you don't sign the same UTXOs multiple times, you are not vulnerable.