mirror of
https://github.com/logos-blockchain/logos-blockchain-specs.git
synced 2026-01-03 21:53:07 +00:00
14 lines
282 B
Python
14 lines
282 B
Python
|
|
from typing import TypeAlias
|
||
|
|
|
||
|
|
import blspy
|
||
|
|
|
||
|
|
from mixnet.utils import random_bytes
|
||
|
|
|
||
|
|
BlsPrivateKey: TypeAlias = blspy.PrivateKey
|
||
|
|
BlsPublicKey: TypeAlias = blspy.G1Element
|
||
|
|
|
||
|
|
|
||
|
|
def generate_bls() -> BlsPrivateKey:
|
||
|
|
seed = random_bytes(32)
|
||
|
|
return blspy.BasicSchemeMPL.key_gen(seed)
|