validateRandomness

Validates that the beacon's randomness field equals SHA-256(signature).

According to the drand specification, the randomness value must always be the SHA-256 hash of the signature. This provides a deterministic, verifiable way to derive random values from the signature and ensures the randomness hasn't been tampered with independently from the signature.

Return

Result.success if randomness matches SHA-256(signature), Result.failure with DrandError.VerificationFailed otherwise

Parameters

beacon

The beacon to validate