Entire config for an indexer app built using Dappetizer with standard Dappetizer DbContext. It corresponds to the value exported from a config file, see candidateConfigFileNames.

Compared to DappetizerConfig, it adds database property which specifies TypeORM connection.

Example

Sample dappetizer.config.ts file with only mandatory values specified:

import { DappetizerConfigUsingDb } from '@tezos-dappetizer/database';

const config: DappetizerConfigUsingDb = {
modules: [
{
id: 'your-node-module-or-relative-path',
config: 'module-config',
},
],
networks: {
mainnet: {
indexing: {
fromBlockLevel: 1796556,
},
tezosNode: {
url: 'https://mainnet-tezos.giganode.io',
},
},
testnet: {
indexing: {
fromBlockLevel: 856123,
},
tezosNode: {
url: 'https://testnet-tezos.giganode.io',
},
},
},
database: {
type: 'sqlite',
database: 'data/db.sqlite',
},
};

export default config;

Hierarchy

Properties

database: Omit<MysqlConnectionOptions, "entities"> | Omit<PostgresConnectionOptions, "entities"> | Omit<CockroachConnectionOptions, "entities"> | Omit<SqliteConnectionOptions, "entities"> | Omit<SqlServerConnectionOptions, "entities"> | Omit<SapConnectionOptions, "entities"> | Omit<OracleConnectionOptions, "entities"> | Omit<CordovaConnectionOptions, "entities"> | Omit<NativescriptConnectionOptions, "entities"> | Omit<ReactNativeConnectionOptions, "entities"> | Omit<SqljsConnectionOptions, "entities"> | Omit<MongoConnectionOptions, "entities"> | Omit<AuroraMysqlConnectionOptions, "entities"> | Omit<AuroraPostgresConnectionOptions, "entities"> | Omit<ExpoConnectionOptions, "entities"> | Omit<BetterSqlite3ConnectionOptions, "entities"> | Omit<CapacitorConnectionOptions, "entities"> | Omit<SpannerConnectionOptions, "entities">

Configures database connection.

Limits

Regular TypeORM connection.

Example

Sample value if you want to use SQLite:

{
type: 'sqlite',
database: 'data/db.sqlite',
}

Example

Sample value if you want to use PostgreSQL:

{
type: 'postgres',
host: 'localhost',
port: 5432,
username: 'postgres',
password: 'postgrespassword',
database: 'postgres',
schema: 'indexer',
}

Configures Hasura for the indexer app.

Configures HTTP server of this indexer app mainly for monitoring.

Configures connections to IPFS for metadata retrieval.

Configures logging of app execution.

modules: NonEmptyArray<{
    config?: unknown;
    id: string;
}>

The non-empty array of IndexerModule to be executed for indexing.

networks: {
    [network: string]: {
        indexing: IndexingDappetizerConfig;
        tezosNode: TezosNodeDappetizerConfig;
    };
}

The indexing config specific for particular Tezos networks e.g. mainnet.

Type declaration

Configures generic time related features.

Configures usage statistics.

Generated using TypeDoc