mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-23 09:01:17 +00:00
11 lines
374 B
Python
11 lines
374 B
Python
from eth2spec.utils.bls import Sign
|
|
|
|
|
|
def sign_voluntary_exit(spec, state, voluntary_exit, privkey):
|
|
domain = spec.get_domain(state, spec.DOMAIN_VOLUNTARY_EXIT, voluntary_exit.epoch)
|
|
message = spec.compute_domain_wrapper_root(voluntary_exit, domain)
|
|
return spec.SignedVoluntaryExit(
|
|
message=voluntary_exit,
|
|
signature=Sign(privkey, message)
|
|
)
|