Post
Topic
Board Development & Technical Discussion
Re: Are bitcoin core psbt and electrum psbt cross compatible?
by
Joe-Bloggs
on 13/03/2024, 11:53:08 UTC
Thanks nc50lc for taking time to make this excellent guide.
I hope other people who want to move funds from their offline wallets and dont know exactly how to make the descriptors code can also find this guide very simple way to spend some of their funds.

Using electrum watch only to make the correct inputs outputs and fees for a tx
Then input to bitcoin core ( so dont need to go through all the dump priv key or even install electrum on offline machine if they dont want to.
Then sign with offline core wallet. Export signed tx and can spend on watch only electrum or on a synced up bitcoin core.
Sounds good.

I

I may do another experiment using clipboard and not using files with bitcoin core.
Because I notice with electrum when you use clipboard outputs and not save to files.
This keeps everything in hex. Which is just numbers and letters.
When you save to files instead it adds extra symbols like//++ other stuff I think psbt is an unsigned tx but with some different way to code it.

The nice thing about just hex is that if you break that long hex string in 3 and fit on one page without sideways scroll.
You can take a picture on your phone and depending which phone you have it can turn that picture into a text file.
So you dont need to transfer anything physical off from the offline machine.
Just a photo. Then use phone to turn back to hex file with built in OCR.

So you can then type decoderawtransaction in bitcoin core to check all the details
If it looks good then sendrawtransaction.

This could be a reasonable solution for the novice who wants to move some btc from offline machine that just has bitcoin core but no electrum already installed there.
 
This process only requires the skill to download electrum to an internet connected machine and copy in the address you want to send from to make the watch only wallet. Then make a send tx and save to psbt file. Take that on usb to you offline machine and load psbt into core.
Sign it and save as file, to transport back to the online full node to broadcast, or broadcast on electrum watch only to broadcast.

Some people say it is unsafe to USB files on and off a airgapped machine. Because sometimes inside the usb bios can be a virus. You can't even see it on the files of the usb. Even formatting cant always remove it.

So perhaps 2 ways to mitigate this I have been thinking about.

1. You can usb on to the airgapped machine the psbt from electrum but then format that usb or even chuck it away if it is just a couple dollars small usb.  Then take a photo and OCR on phone of the signed raw hex output, to test by decoderawtransaction. Before sending.

2. If you're great at touch typing of have a lot of bitcoins then you may even consider
If it is possible for you to export the unsigned tx you made in electrum not by a file but by clipboard and get in raw hex.
Then copy it by just typing it all into your offline machine. Dont make a mistake though.

That is if you really dont want any single physical contact with usb or anything with the airgapped machine.

I have not tried 2. I'm not to great at typing without looking at the keyboard.

Also Zaguru12

Thanks it's good to know they need password and dat file.

This information makes me think signing with core on airgapped machine is safer than importing priv key to electrum.
Because even if a keylogger could sneak the private key out of the airgapped machine or the password encrypting the dat file on a qr code. I dont think it can sneak the wallet.dat off this way.

If anyone can notice any problems with my process then please say.