Oddbean new post about | logout
 Noob Q: How do I export an zpub or xpub from a Core LN node wallet? I have elect-rs and RTL set up too if that makes anything easier. Just want to have a watch-only wallet available for the on-chain wallet. 
 Maybe @niftynei knows? Or @jb55? 
 good question !

it definitely uses some kind of deterministic derivation for the wallet keys, but no idea which one or if this is possible 
 Did you tried to import the BIP39 seed of that CLN wallet into Electrum or sparrow and extract from there the xpub ? 
 This can dump an xpub from cln:

https://docs.corelightning.org/reference/lightning-hsmtool 
 ya dumponchaindescriptors seems like the way to go 
 Thanks, it outputs descriptors for wpkh, sh and tr. I want to import this to Sparrow but it requires to import a file (or scan qr) so I tried to just copy/paste the descriptors into a file and import that but then I get an error that it's not valid. Any ideas what I'm doing wrong here? What is the descriptors file supposed to look like? 
 it probably imports BSMS files (https://github.com/bitcoin/bips/blob/master/bip-0129.mediawiki)

it's been a while i've used sparrow, are you really sure there isn't a way to create a watch-only wallet by specifying custom descriptors and derivation paths in the ui? 
 Counterintuitively, in Sparrow you need to create a new wallet first, before you can import an xpub 😉. Just create a new wallet and then choose "xpub / watch only wallet"