Skip to content

bitcoinhodler/trim-psbt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trim-psbt

This is a tool to trim Bitcoin PSBTs (Partially Signed Bitcoin Transactions) down to a smaller size by removing unnecessary info.

Who is this for?

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).

How do I use it?

With your base64-encoded PSBT in a file, run:

$ ./trim_psbt.py < my-psbt.txt > trimmed-psbt.txt

What does it remove?

For each input that has both non_witness_utxo and witness_utxo input data, it will remove the non_witness_utxo.

Why?

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.

Security issue? What?

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.

About

Tool to trim overly large Bitcoin PSBTs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages