← Files AgentBrokoARCHIVED FILE

.venv/Lib/site-packages/eth_hash/abc.py

583 Bytes · Oct 2, 2026 · 00:32 UTC

↓ Download file

from abc import (
    ABC,
    abstractmethod,
)


class PreImageAPI(ABC):
    @abstractmethod
    def __init__(self, value: bytes) -> None:
        ...

    @abstractmethod
    def update(self, value: bytes) -> None:
        ...

    @abstractmethod
    def digest(self) -> bytes:
        ...

    @abstractmethod
    def copy(self) -> "PreImageAPI":
        ...


class BackendAPI(ABC):
    @abstractmethod
    def keccak256(self, in_data: bytearray | bytes) -> bytes:
        ...

    @abstractmethod
    def preimage(self, in_data: bytearray | bytes) -> PreImageAPI:
        ...

SHA-256: dbedaea641baeb126556d316f530527843f61ac77e9e8fdc37c517b47aea287b