1

Public key:

bitcoin-cli getdescriptorinfo "wpkh(027fda10f37e6c637a1cfeba2cbada86de36f28e63d4ded9e1314117739f6419a9)"
{
  "descriptor": "wpkh(027fda10f37e6c637a1cfeba2cbada86de36f28e63d4ded9e1314117739f6419a9)#99knjm9r",
  "checksum": "99knjm9r",
  "isrange": false,
  "issolvable": true,
  "hasprivatekeys": false
}

Private key:

bitcoin-cli getdescriptorinfo "wpkh(cRLX3mChef5FEFi6y46yH1YJ4Cy7K3WW4bJDBZ7LiygKp4CBsF6p)"
{
  "descriptor": "wpkh(027fda10f37e6c637a1cfeba2cbada86de36f28e63d4ded9e1314117739f6419a9)#99knjm9r",
  "checksum": "s5qjl8cq",
  "isrange": false,
  "issolvable": true,
  "hasprivatekeys": true
}
  1. What is the correct way to use private keys in descriptors?
  2. Why are two checksums returned in getdescriptorinfo for private key?
  3. Why does the KEY inside parenthesis change when using private key with getdescriptorinfo?
2

Descriptors with a private key (or xprv) in it are equivalent to their version with the public key instead, apart from also conveying the private key information.

  1. For what purpose?
  2. The descriptor field only reports the descriptor itself (i.e., without private key material). The checksum field reports the checksum for your input. This is also explained in the help text for the RPC.
  3. It's removing private key material.
1
  • 1. I wanted to import a descriptor using private key but had no checksum. Used getdescriptorinfo to see checksum. 2. and 3. Yes it all makes sense now. I carefully looked at results again after reading your answer. Thanks.
    – Prayank
    Jul 10 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.