alloy_eips::eip4844

Function kzg_to_versioned_hash

Source
pub fn kzg_to_versioned_hash(commitment: &[u8]) -> B256
Available on crate feature sha2 only.
Expand description

Calculates the versioned hash for a KzgCommitment of 48 bytes.

Specified in EIP-4844

ยงPanics

If the given commitment is not 48 bytes long.