Skip to content
docs

AlchemyClient

Defined in: history-evm/src/alchemy.ts:100

Alchemy alchemy_getAssetTransfers as a history backend, for chains or volumes the explorers do not cover. Needs an Alchemy key.

new AlchemyClient(options): AlchemyClient

Defined in: history-evm/src/alchemy.ts:107

AlchemyClientOptions

AlchemyClient

readonly backend: "alchemy"

Defined in: history-evm/src/alchemy.ts:101


degraded: ExplorerError | undefined

Defined in: history-evm/src/alchemy.ts:105

Last enrichment failure toRows absorbed (tests / diagnostics); cleared on the next successful batch.


readonly url: string

Defined in: history-evm/src/alchemy.ts:103

batch(calls): Promise<unknown[]>

Defined in: history-evm/src/alchemy.ts:173

JSON-RPC batch in chunks of BATCH_SIZE; results in call order (null where the node had nothing).

object[]

Promise<unknown[]>


getTransaction(hash): Promise<{ tokens: TokenRow[]; tx: TxRow; } | undefined>

Defined in: history-evm/src/alchemy.ts:311

eth_getTransactionByHash + receipt in one batch; ERC-20 Transfer logs → token rows; block timestamp fetched when needed.

string

Promise<{ tokens: TokenRow[]; tx: TxRow; } | undefined>


listSpecs(address): ListSpec<{ block: number; }>[]

Defined in: history-evm/src/alchemy.ts:215

Two window-pagination lists (from, to); next is a marker, paging is by toBlock.

string

ListSpec<{ block: number; }>[]


rpc(method, params): Promise<unknown>

Defined in: history-evm/src/alchemy.ts:167

string

unknown[]

Promise<unknown>


toRows(rows): Promise<ExplorerRows>

Defined in: history-evm/src/alchemy.ts:237

Window rows (from + to transfers) → the three explorer lists. Transfers are de-duplicated by uniqueId (a self-transfer, or a swap whose legs sit in both lists, appears twice), grouped by hash, and every unique hash gets eth_getTransactionByHash + eth_getTransactionReceipt in one batch (≤ 10 requests per HTTP call, retried on rate limits). erc20 rows → token rows, internal rows → internal rows, external rows are the transaction’s own value and are already covered by the tx row (no second native transfer); only when the node has no tx (dropped / reorged) is the external row turned into a bare tx row so the item still renders.

Map<string, object[]>

Promise<ExplorerRows>