Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

tweak_public_key

Tweak a public key for Taproot according to BIP-341

Arguments

  • internal_key - The internal public key (x-coordinate only)
  • merkle_root - Optional Merkle root of the script tree

Returns

  • TweakedPublicKey - The tweaked output key and parity

Fully qualified path: alexandria_btc::taproot::tweak_public_key

pub fn tweak_public_key(internal_key: u256, merkle_root: Option<u256>) -> Option<TweakedPublicKey>