Skip to content

Commit

Permalink
update getting started docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fracek committed Nov 27, 2024
1 parent f8fbbdf commit 87d78a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/v2/getting-started/installation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ import { defineIndexer } from "@apibara/indexer";

export default defineIndexer(EvmStream)({
streamUrl: "https://ethereum.preview.apibara.org",
finality: "accepted",
startingCursor: {
orderKey: 21_000_000n
},
Expand All @@ -116,11 +115,15 @@ Notice the following:
- The `defineIndexer` function takes the stream as parameter. In this case, the
`EvmStream` is used. This is needed because Apibara supports multiple networks
with different data types.
- `streamUrl` specifies where the data comes from. You can connect to streams hosted
by us, or to self-hosted streams.
- `startingCursor` specifies from which block to start streaming.
- The `filter` specifies which data to receive. You can read more about the available
data for EVM chains in the [EVM documentation](/docs/v2/networks/evm/filter/).
data for EVM chains in the [EVM documentation](/docs/v2/networks/evm/filter).
- The `transform` function is called for each block. It receives the block as parameter.
This is where your indexer processes the data.

There are more indexer options available, you can find them in the documentation (TODO: link).

## Running the indexer

Expand Down Expand Up @@ -201,7 +204,6 @@ import { defineIndexer } from "@apibara/indexer";

export default defineIndexer(StarknetStream)({
streamUrl: "https://starknet.preview.apibara.org",
finality: "accepted",
startingCursor: {
orderKey: 900_000n,
},
Expand Down

0 comments on commit 87d78a6

Please sign in to comment.