20 lines
482 B
Python
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
|