How to use the blspy.AggregationInfo function in blspy

To help you get started, we’ve selected a few blspy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethereum / trinity / eth2 / _utils / bls / backends / chia / api.py View on Github external
def verify(message_hash: Hash32,
           pubkey: BLSPubkey,
           signature: BLSSignature,
           domain: Domain) -> bool:
    pubkey_chia = _pubkey_from_bytes(pubkey)
    signature_chia = _signature_from_bytes(signature)
    signature_chia.set_aggregation_info(
        AggregationInfo.from_msg(
            pubkey_chia,
            combine_domain(message_hash, domain),
        )
    )
    return cast(bool, signature_chia.verify())