21 lines
497 B
Python
Raw Normal View History

2025-10-03 22:27:30 +02:00
from abc import ABC, abstractmethod
2025-10-15 20:53:52 +02:00
from typing import AsyncIterator, List
2025-10-03 22:27:30 +02:00
from node.models.blocks import Block
from node.models.health import Health
from node.models.transactions import Transaction
class NodeApi(ABC):
@abstractmethod
async def get_health_check(self) -> Health:
pass
@abstractmethod
2025-10-15 20:53:52 +02:00
async def get_blocks(self, **kwargs) -> List[Block]:
pass
@abstractmethod
async def get_blocks_stream(self) -> AsyncIterator[List[Block]]:
2025-10-03 22:27:30 +02:00
pass