0
I have figured out how to import an xpub, but when i use getdescriptorinfo on an xprv:
getdescriptorinfo "wpkh(xprvA1Gpa5TRogN9eRoBFZLAEKjfvxzXTZpNpuJ9WXvTsRT3ZoW1EFnrAXji4aYPAktDc5ZYgAcS8XH5npiUdVztxdyrig2rZvNsrTEbhz1x2KQ/*)"
it returns
{
"descriptor": "wpkh(xpub6EGAyazKe3vSruseMasAbTgQUzq1s2YEC8DkJvL5Rkz2Sbq9mo76iL4Buq1opb9EeNfB2DzqeCuuDMcpx2ZTkcJdnp24Sa8Qo7CgwfbGrD1/*)#2p7j3v7x",
"isrange": true,
"issolvable": true,
"hasprivatekeys": true
}
The descriptor is an xpub? Why? It sees that the key has private keys. If I use this descriptor with importmulti and specify a range will it import the private keys and addresses? I was expecting getdescriptorinfo to return an xprv. If this is not how you import an xprv then how do you?
So the private keys will get automatically imported with the xprv descriptor? – Fontaine – 2019-05-09T18:32:28.377
2This is incorrect.
importprivkeyignores private keys in descriptors; you need to provide them separately in WIF format (for now; this will likely be improved in 0.19). – Pieter Wuille – 2019-05-09T23:30:34.980I removed my missing/wrong comment (could not edit). – Jonas Schnelli – 2019-05-10T07:20:50.330