Using NPM packages
Apibara indexers are powered by the Deno Javascript runtime, this makes them incredibly fast and self-contained.
Indexers dependencies are loaded from external CDNs like:
You can read more about managing dependencies on the official Deno documentation.
Examples
The following script loads common utilities from Starknet.js and Viem.
indexer.ts
import { hash, uint256 } from "https://esm.run/[email protected]";
import { formatUnits } from "https://esm.run/[email protected]";