Compute a KeyPair
Wraps a secp256k1_keypair type.
merkle_root is used to optionally perform tweaking of the internal key, as specified in BIP341:
If merkle_root == nullptr: no tweaking is done, use the internal key directly (this is used for signatures in BIP342 script).
If merkle_root->IsNull(): tweak the internal key with H_TapTweak(pubkey) (this is used for key path spending when no scripts are present).
Otherwise: tweak the internal key with H_TapTweak(pubkey || *merkle_root) (this is used for key path spending with the Merkle root of the script tree).
The computed key pair.
| Name | Description |
|---|---|
| merkle_root | Optional Merkle root controlling BIP341 tweaking (see above). |