"""Block endpoints.""" from .client import Client from .models import Block, InterchainTrace class BlockClient: def __init__(self, client: Client): self._client = client def get(self, block_id: str) -> Block: return self._client.get(f"/api/v1/block/{block_id}", Block) def get_interchain(self, block_id: str) -> InterchainTrace: """Trace a block to the validator (verification) blocks that validated it and the public-chain interchain anchors those validator blocks were bundled into.""" return self._client.get( f"/api/v1/block/{block_id}/interchain", InterchainTrace )