auradefi 0.1.1
PyPI GitHub

PageFetcher

auradefi.embed.sync · source

Structural seam: ONE page of raw explorer rows for one window.

A host satisfies it by shape (rule #12), no base class, no registration. Rows are the explorer's RAW dicts (Etherscan txlist rows); parsing is the decoder's job, not this seam's.

fetch_txlist

fetch_txlist(self, chain_id: str, address: str, *, start_block: int, end_block: int, page: int, offset: int, sort: str) -> list[dict]

Raw rows in [start_block, end_block], sort asc|desc.

page is 1-based and offset is the page size. An empty history is []. Etherscan's status-0 "No transactions found" is NOT an error (SPEC §3.3); a real failure raises auradefi.errors.SourceError.

REQUIRED of the transport: successive pages of ONE window must PARTITION it. For a fixed (start_block, end_block, sort) the row order must be total and stable across page requests, including BETWEEN transactions of the SAME block, so no row is served twice and none is skipped. That is what makes a page shorter than offset mean "the window drained", the signal both phases stop on. A transport that reorders rows inside a block between requests can hide a transaction behind a short page, and the backfill would report itself complete without it.

Parameters

chain_idrequired, str

none

addressrequired, str

none

start_blockrequired, int

none

end_blockrequired, int

none

pagerequired, int

none

offsetrequired, int

none

sortrequired, str

none

Raises

SourceError

__init__

__init__(self, *args, **kwargs)

Parameters

argsrequired, any

none

kwargsoptional, any

none