rainbowadn/rainbowadn/chain/states/stateprotocol.py
2022-06-21 21:17:28 +03:00

20 lines
482 B
Python

from typing import Generic, TypeVar
from rainbowadn.core import *
from rainbowadn.nullability import *
__all__ = ('StateProtocol',)
HeaderType = TypeVar('HeaderType')
StateType = TypeVar('StateType')
class StateProtocol(Generic[HeaderType, StateType]):
async def verify(
self,
previous: NullableReference[StateType],
header: HashPoint[HeaderType],
state: HashPoint[StateType]
) -> bool:
raise NotImplementedError