1.2.0-pre.22 • Published 4 months ago

@0xobelisk/sui-indexer v1.2.0-pre.22

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

sui-indexer

A minimal Typescript indexer for Sui Move events (built on sui-client)

Usage

Install and run with:

npm install @0xobelisk/sui-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 Dubhe Store to index. By default, store-indexer will index all Dubhe 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
1.2.0-pre.22

4 months ago

1.2.0-pre.21

4 months ago

1.2.0-pre.20

5 months ago

1.2.0-pre.19

5 months ago

1.2.0-pre.18

5 months ago

1.2.0-pre.17

5 months ago

1.2.0-pre.16

5 months ago

1.2.0-pre.15

5 months ago

1.2.0-pre.14

5 months ago

1.2.0-pre.13

5 months ago

1.2.0-pre.12

5 months ago

1.2.0-pre.11

5 months ago

1.2.0-pre.10

5 months ago

1.2.0-pre.9

5 months ago

1.2.0-pre.8

5 months ago

1.2.0-pre.7

5 months ago

1.2.0-pre.6

5 months ago

1.2.0-pre.5

5 months ago

1.2.0-pre.4

5 months ago

1.2.0-pre.3

5 months ago

1.2.0-pre.2

5 months ago

1.2.0-pre.1

5 months ago

1.1.16

6 months ago

1.1.15

6 months ago

1.1.14

6 months ago

1.1.13

6 months ago

1.1.12

6 months ago

1.1.11

6 months ago

1.1.10

6 months ago

1.1.9

6 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.5

7 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago