pub fn derive_private_key<T: Signing>(
    secp_ctx: &Secp256k1<T>,
    per_commitment_point: &PublicKey,
    base_secret: &SecretKey
) -> Result<SecretKey, SecpError>
Expand description

Derives a per-commitment-transaction private key (eg an htlc key or delayed_payment key) from the base secret and the per_commitment_point.

Note that this is infallible iff we trust that at least one of the two input keys are randomly generated (ie our own).