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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AlchemyClient(
options):AlchemyClient
Defined in: history-evm/src/alchemy.ts:107
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”AlchemyClient
Properties
Section titled “Properties”backend
Section titled “backend”
readonlybackend:"alchemy"
Defined in: history-evm/src/alchemy.ts:101
degraded
Section titled “degraded”degraded:
ExplorerError|undefined
Defined in: history-evm/src/alchemy.ts:105
Last enrichment failure toRows absorbed (tests / diagnostics); cleared on the next successful batch.
readonlyurl:string
Defined in: history-evm/src/alchemy.ts:103
Methods
Section titled “Methods”batch()
Section titled “batch()”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).
Parameters
Section titled “Parameters”object[]
Returns
Section titled “Returns”Promise<unknown[]>
getTransaction()
Section titled “getTransaction()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<{ tokens: TokenRow[]; tx: TxRow; } | undefined>
listSpecs()
Section titled “listSpecs()”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.
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”ListSpec<{ block: number; }>[]
rpc(
method,params):Promise<unknown>
Defined in: history-evm/src/alchemy.ts:167
Parameters
Section titled “Parameters”method
Section titled “method”string
params
Section titled “params”unknown[]
Returns
Section titled “Returns”Promise<unknown>
toRows()
Section titled “toRows()”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.
Parameters
Section titled “Parameters”Map<string, object[]>
Returns
Section titled “Returns”Promise<ExplorerRows>