Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

public_key_hash

Generates a Bitcoin public key hash using Hash160 (RIPEMD160 of SHA256).

Computes the standard Bitcoin public key hash by serializing the public key and applying the Hash160 function (RIPEMD160(SHA256(pubkey))).

Arguments

  • public_key - The Bitcoin public key to hash

Returns

  • Array<u8> - 20-byte public key hash

Fully qualified path: alexandria_btc::keys::public_key_hash

pub fn public_key_hash(public_key: BitcoinPublicKey) -> Array<u8>