• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

Create a .psbt using the BitcoinCore client

Started by Bitcoin, Feb 15, 2022, 06:30 am

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Bitcoin

Create a .psbt using the BitcoinCore client

I am trying to create a .psbt using BitcoinCore on mainnet. The use-case is that I want to be able to export the unsigned transaction, import it into my cold-storage wallet (using BitcoinCore) and sign it, to then broadcast it. I have successfully done this using Electrum as a hot wallet to generate the transaction, but would like to move away from any third party software.


Basically I am trying to follow the steps from this post, but it does not work. The problem is that BitcoinCore will recognize the balance as watch only (as it should) but when trying to create a transaction I can not find the coin inputs listed anywhere (under the Coin Control feature).


The base transaction is b69314fff08ae8b58c41d653ea212d9e1f2ecf683f0ea96ee5f9c52f22b0a189 and my address is bc1q4xuxxf6mmcyk9q3k3lufhr7rlsn9hzhrvkdgqz. For Electrum, all I had to do to generate a .psbt was importing the address. I have tried importing the address into BitcoinCore using


importaddress bc1q4xuxxf6mmcyk9q3k3lufhr7rlsn9hzhrvkdgqz

and also importing the public key using the importpubkey command, then re-scanning the wallet. Nothing worked.


I also tried the following command (and multiple variations of it) which some people claimed fixed the issue for them:


importmulti '[{"desc": "wpkh([a9b86327]0391f12147a67c291785baf634187f7ad24d4e491b07f53543a33f7705736efeb6)#jpxe908h","timestamp": "now","watchonly": true}]'

using inputs provided by getaddressinfo. Again no coin inputs were selectable after re-scanning the wallet.


Is there something I am doing wrong? I am a bit confused why BitcoinCore will not allow me to create a .psbt even though Electrum did instantly (and I was subsequently able to import and sign it using BitcoinCore).


Also, would someone be able to explain in simple terms what the desc field is doing? From what I gather, it holds a descriptor that tells the wallet how to generate addresses, but I could use a short example to understand it better.


Source: Create a .psbt using the BitcoinCore client