pub fn get_commitment_transaction_number_obscure_factor(
    broadcaster_payment_basepoint: &PublicKey,
    countersignatory_payment_basepoint: &PublicKey,
    outbound_from_broadcaster: bool,
) -> u64
Expand description

Commitment transaction numbers which appear in the transactions themselves are XOR’d with a shared secret first. This prevents on-chain observers from discovering how many commitment transactions occurred in a channel before it was closed.

This function gets the shared secret from relevant channel public keys and can be used to “decrypt” the commitment transaction number given a commitment transaction on-chain.