Creating a watch-only wallet on the online pc and import descriptions isn't insecure right ? I'm just importing 2 descriptors, it's not like my entire .dat file I suppose ...
The idea is not to have the .dat file on an online PC, for security reasons.
Based from this, it's looks like for a new set-up, not from an existing wallet.dat file?
For the security,
listdescriptors without "
true" arg only outputs public descriptors containing your wallet's extended public key (
xpub).
That's what the instructions mentioned to import to the "
watching-only" wallet.dat in the online PC.
-snip-
Let me take a look at this. I will return if I have any questions. It's interesting.
But I read in that topic that "Your online PC must have bitcoin core installed and synched", so we cannot avoid having a synched node? (2nd question I posted here). Or maybe we can use a public node to broadcast the Tx... ? The idea is to find the easiest and fastest way. Let me take a deep look.
Okay, if you really don't want to sync a node, you can go for Electrum as the watching-only wallet.
In the current version, you can directly import the addresses or to be able to generate an HD watching-only wallet; the extended public key in your public descriptor.
For the former: Select "
Import bitcoin addresses or private keys" when creating a wallet, then import your address(
es), one per line.
The disadvantage of this over the other option is: you're stuck with those addresses and you'll have to manually import if you want to use more of your addresses from offline Bitcoin Core.
In the other option, both online and offline wallets can generate the same addresses of the selected script type, including change.
The advantage of this is you can import TapRoot addresses.
For the latter: Select "
Standard->Use a master key"
but for extended public key must be converted from "
xpub" into "
zpub" or "
ypub" if you're not going to use legacy addresses; refer to the descriptor's script type, "
wpkh(" or "
sh(wpkh".
You can do this in Electrum's console but it's only accessible once you created a wallet, so create a dummy wallet that you can delete later, name it accordingly. (
or use the command-line)
Once a wallet is loaded, enable the console in "
View->Show console" and go to 'Console' tab, then type the command:
convert_xkey(xkey="xpub.....",xtype="p2wpkh")The sample "
xtype" is for "
bc1q" 'Native SegWit' addresses, change it to "
p2wpkh-p2sh" if you want to use "
3" 'p2sh-SegWit' instead, TapRoot isn't currently supported.
Then Import the output in the menu above.
To export transactions from that watching-only wallet: Select "
Share->Save to file/Copy to Clipboard".
To import to Bitcoin Core GUI: Select "
File->Load PSBT from...", sign it and copy to clipboard, go to Console (
Window->Console), finalize it with "
finalizepsbt <paste_it>".
To import the finalized signed raw transaction to Electrum: Use, "
Tools->Load transaction->from Text", check the inputs/outputs, fee and amounts, then broadcast it.