Bitcoin Forum
July 30, 2024, 09:24:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core: fundrawtransaction or PSBT for signing simple transactions offline  (Read 22 times)
tiffy (OP)
Jr. Member
*
Offline Offline

Activity: 36
Merit: 40


View Profile
Today at 01:07:37 AM
Merited by LoyceV (6), ABCbits (3)
 #1

I am currently using the Core Client 27.1. I only use the demon so far. If you think it is advisable, I can also switch to the GUI client. But let me first describe my scenario.

I have an offline/cold wallet on a Raspberry and a corresponding watch wallet (on a normal x86 computer). Communication between the systems takes place via cameras and QR codes. This worked quite well in tests. I can easily transfer 2k of data per QR code.

I would prefer to use only the BIP 84 addresses that the Core Client uses by default. And generally operate everything in standard mode. I only need normal Bitcoin transactions (no multisig or anything special). I would like to leave most of the work to the Core Client. I have already looked on the Internet and found this article by Pieter Wuille:

https://bitcoin.stackexchange.com/a/106204

The API call fundrawtransaction seems to be exactly what I'm looking for. But later Wuille says that it has been superseded by PSBT. I am now wondering which direction I should go in. PSBT seems to have a lot of possibilities and is therefore probably generally easier. But I just want to be able to send coins from A to B in a secure and controlled way. With devices that can only exchange QR codes.

How would you proceed?
tiffy (OP)
Jr. Member
*
Offline Offline

Activity: 36
Merit: 40


View Profile
Today at 01:16:44 PM
Last edit: Today at 01:32:11 PM by tiffy
 #2

I looked further on the internet and found this series of articles:
https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/07_1_Creating_a_Partially_Signed_Bitcoin_Transaction.md

I found the section Create a PSBT the Easy Way to be the most suitable for me. But of course I have to try it out first.

HWI is discussed in the last article. I didn't know this tool before. I think it's a good thing but at the moment I have the feeling it adds just another layer of complexity to my already existing setup. Can't I just use walletprocesspsbt on my HW wallet (Raspberry with Bitcoind 27.1)? My approach would be roughly as follows:

1. Use walletcreatefundedpsbt with empty inputs on the watch-only Wallet.
2. Transfer the output of walletcreatefundedpsbt as a QR code to my HW Wallet.
3. Use walletprocesspsbt on the HW Wallet with the transfered output of walletcreatefundedpsbt.
4. Transfer the output of walletprocesspsbt as a QR code back to the watch-only Wallet.
5. Then there: finalizepsbt and sendrawtransaction

Does that make sense? Have I understood the scheme correctly?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3472
Merit: 6793


Just writing some code


View Profile WWW
Today at 03:37:47 PM
 #3

Use PSBTs since they contain all of the extra information needed in order to sign. The raw transaction workflow will require you to provide that data separately.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!