2.0.7 • Published 1 day ago

@latticexyz/store-indexer v2.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

store-indexer

A minimal Typescript indexer for MUD Store events (built on store-sync)

Usage

Install and run with:

npm install @latticexyz/store-indexer

npm sqlite-indexer
# or
npm postgres-indexer & npm postgres-frontend

or execute the one of the package bins directly:

npx -p @latticexyz/store-indexer sqlite-indexer
# or
npx -p @latticexyz/store-indexer postgres-indexer & npx -p @latticexyz/store-indexer postgres-frontend

Configuration

Each indexer can be configured with environment variables.

Common environment variables for indexer

VariableDescriptionDefault
RPC_HTTP_URLHTTP URL for Ethereum RPC to fetch data from
RPC_WS_URLWebSocket URL for Ethereum RPC to fetch data from
START_BLOCKBlock number to start indexing from0
MAX_BLOCK_RANGEMaximum number of blocks to fetch from the RPC per request1000
POLLING_INTERVALHow often to poll for new blocks (in milliseconds)1000
STORE_ADDRESSOptional address of the MUD Store to index. By default, store-indexer will index all MUD Stores on the chain.

Note that you only need one of RPC_HTTP_URL or RPC_WS_URL, but we recommend both. The WebSocket URL will be prioritized and fall back to the HTTP URL if there are any connection issues.

Common environment variables for frontend

VariableDescriptionDefault
HOSTHost that the indexer frontend server listens on0.0.0.0
PORTPort that the indexer frontend server listens on3001

Postgres indexer environment variables

VariableDescriptionDefault
DATABASE_URLPostgres connection URL
HEALTHCHECK_HOSTHost that the indexer healthcheck server listens on
HEATHCHECK_PORTPort that the indexer healthcheck server listens on

SQLite indexer environment variables

VariableDescriptionDefault
SQLITE_FILENAMESQLite database filenameindexer.db
2.0.9

8 days ago

2.0.8

11 days ago

2.0.7

13 days ago

2.0.6

21 days ago

2.0.5

27 days ago

2.0.3

1 month ago

2.0.2

1 month ago

2.0.4

1 month ago

2.0.0-next.18

2 months ago

2.0.1

2 months ago

2.0.0

2 months ago

2.0.0-next.17

3 months ago

2.0.0-next.16

4 months ago

2.0.0-next.15

4 months ago

2.0.0-next.14

6 months ago

2.0.0-next.13

6 months ago

2.0.0-next.12

7 months ago

2.0.0-next.11

7 months ago

2.0.0-next.10

7 months ago

2.0.0-next.9

8 months ago

2.0.0-next.8

8 months ago

2.0.0-next.7

8 months ago

2.0.0-next.6

8 months ago

2.0.0-next.5

8 months ago

2.0.0-next.4

9 months ago

2.0.0-next.3

9 months ago

2.0.0-next.2

9 months ago

2.0.0-next.1

9 months ago