Options
All
  • Public
  • Public/Protected
  • All
Menu

This file is part of dHealth dApps Framework shared under LGPL-3.0 Copyright (C) 2022-present dHealth Network, All rights reserved.

package

dHealth dApps Framework

subpackage

Backend

author

dHealth Network devs@dhealth.foundation

license

LGPL-3.0

Hierarchy

  • AppConfiguration

Index

Constructors

  • Construct an instance of this application configuration.

    CAUTION: Creating an instance of this class automatically interprets the runtime configuration. Because of this, any errors that are present in the syntax of your runtime configuration must be solved before this method gets called by the runtime.

    internal
    access

    public

    Returns AppConfiguration

Properties

assets: AssetsConfig

The dApp assets configuration. This configuration object is used to determine assets discovery information and to determine how fees are paid for transactions issued by this dApp.

Reference

AssetsConfig

access

protected

var

{AssetsConfig}

The dApp configuration object. This configuration object is used to determine general settings of this dApp runtime including its' name, its' main public key or scopes that are enabled for the dApp in the backend runtime.

Reference

DappConfig

access

protected

var

{DappConfig}

monitoring: MonitoringConfig

The dApp monitoring configuration. This configuration object is used to determine dApp monitoring information.

Reference

MonitoringConfig

access

protected

var

{MonitoringConfig}

network: NetworkConfig

The dApp network configuration. This configuration object is used to determine communication, transport and network information.

Reference

NetworkConfig

access

protected

var

{NetworkConfig}

The dApp OAuth configuration. This configuration object is used to determine communication, transport and processes that are used to connect and integrate with custom data providers.

Reference

OAuthConfig

access

protected

var

{OAuthConfig}

payout: PayoutConfig

The dApp payouts configuration. This configuration object is used to determine how payouts are created for this dApp and determines the source of tokens.

Note that this configuration may be disabled in the cases where the payout scope is disabled.

Reference

PayoutConfig

access

protected

var

{PayoutConfig}

processor: ProcessorConfig

The dApp processor configuration. This configuration object is used to determine how information is processed into operations for this dApp.

Reference

ProcessorConfig

access

protected

var

{ProcessorConfig}

security: SecurityConfig

The dApp security configuration. This configuration object is used to determine communication, transport and processes are encrypted in scope that are critical to the security of a runtime.

Reference

SecurityConfig

access

protected

var

{SecurityConfig}

social: SocialConfig

The dApp social platforms configuration. This configuration object is used to determine social platforms are integrated to share content.

Reference

SocialConfig

access

protected

var

{SocialConfig}

statistics: StatisticsConfig

The dApp statistics configuration. This configuration object is used to determine how aggregations are performed and stored in the database to enable much faster aggregated data access (e.g. leaderboards).

Reference

StatisticsConfig

access

protected

var

{StatisticsConfig}

transport: TransportConfig

The dApp transport configuration. This configuration is used to determine dApp monitoring transport information.

Reference

TransportConfig

access

protected

var

{TransportConfig}

The dApp database module using {@link MongooseModule} from nestjs. This object is not available outside of this class and is defined to limit the number of instances created which open a request to connect to the database.

Storage of a singular database adapter permits to define a singleton pattern around database connection and query execution.

access

private

static
var

{AppDatabaseModule}

EVENT_EMITTER: DynamicModule

The dApp event emitter module using {@link EventEmitterModule} from nestjs. This object is not available outside of this class and is defined to limit the number of instances created which serves as the application's internal event emitter/handler.

Storage of a singular event emitter adapter permits to define a singleton pattern around event emitters and event listeners.

access

private

static
var

{DynamicModule | EventEmitterModule}

MAILER: DynamicModule

The dApp mailer module using {@link MailerModule} from @nestjs-modules/mailer. This object is not available outside of this class and is defined to limit the number of instances created which serves as the application's internal and public mailer.

Storage of a singular mailing adapter permits to define a singleton pattern around mailer services for public and internal mailing.

access

private

static
var

{DynamicModule | MailerModule}

Accessors

  • get dappName(): string
  • This static helper getter method returns the curently configured dApp name as is used in multiple places of this runtime.

    access

    public

    static

    Returns string

Methods

  • This method validates the configuration objects of different scopes in the dApp configuration object.

    access

    public

    static

    Parameters

    Returns boolean

    Returns true given valid configuration.

  • This method validates the capacity to connect to the database using the dApp configuration object.

    CAUTION: this method opens the database connection, which requires a database backend to be running as well, i.e. please start running the database server before this method is called.

    access

    public

    static

    Parameters

    Returns boolean

    Returns true given valid configuration.

  • This method validates the capacity to discover assets on the network using the dApp configuration object.

    access

    public

    static

    Parameters

    Returns boolean

    Returns true given valid configuration.

  • This method validates the presence of mandatory configuration fields in the dApp configuration object.

    access

    public

    static

    Parameters

    Returns boolean

    Returns true given valid configuration.

  • This method validates the capacity to determine network connection using the dApp configuration object.

    access

    public

    static

    Parameters

    Returns boolean

    Returns true given valid configuration.

  • This method is used internally to validate the configuration of the {@link OAuthModule:PROCESSOR}.

    access

    protected

    static

    Parameters

    Returns boolean

    Returns true given valid configuration.

  • This method validates the security settings that are in place using the dApp configuration object.

    access

    public

    static

    Parameters

    Returns boolean

    Returns true given valid configuration.

  • getConfig(section: string): object
  • This static helper method returns the configuration section value based on the provided section name.

    access

    public

    static

    Parameters

    • section: string

      The config section name e.g. "dapp", "statistics".

    Returns object

  • This method initializes the internal database connection adapter.

    You should not have to call this method manually, it is used inside Schedulers and Scopes to perform the configuration of database adapters.

    CAUTION: this method opens the database connection, which requires a database backend to be running as well, i.e. please start running the database server before this method is called.

    access

    public

    static

    Returns AppDatabaseModule

    A @nestjs/mongoose MongooseModule object.

  • getDatabaseUrl(): string
  • This method returns the database URL which can be used to connect to the mongo server.

    Returns string

  • getEventEmitterModule(): DynamicModule
  • This method initializes the internal event emitter adapter.

    You should not have to call this method manually, it is used inside Schedulers and Scopes to perform the configuration of event emitter adapters.

    access

    public

    static

    Returns DynamicModule

  • getLoaders(): (() => {})[]
  • This static helper method returns all the configuration loaders. This method does not interpret the content of configuration objects.

    This method is used during the nestjs initialization process inside the private constructor of ScopeFactory.

    access

    public

    static

    Returns (() => {})[]

    )[]} An array of initializer functions.

  • getMailerModule(): DynamicModule
  • This method initializes the internal mailer module.

    You should not have to call this method manually, it is used inside EmailNotifierModule to perform the configuration of mailers.

    access

    public

    static

    Returns DynamicModule

Generated using TypeDoc