Class: MoralisCore

moralis-monorepo / @moralisweb3/core / MoralisCore

Class: MoralisCore

@moralisweb3/core.MoralisCore

MoralisCore is used in all Moralis applications
This class is required to be implemented in every app

This class is responsible for:

  • registering, removing and accessing modules
  • accessing and changing the config

Table of contents

Methods

Methods

registerModules

registerModules(modules): void

Register all specified modules and configurations

Params

array of all modules (any module that is extended from BaseModule) that you want to include

Parameters

NameType
modules(ModuleFactory | Module<any>)[]

Returns

void


registerModule

registerModule(module): void

Register a new module

Parameters

NameType
moduleModuleFactory | Module<any>

Returns

void


start

start(providedConfig?): Promise<void>

Start all modules, this function should be called before any interaction with a module,
as it is responsible for initialising the modules.

This will call start() on every registered module

Parameters

NameType
providedConfig?Partial<MoralisConfigValues>

Returns

Promise<void>


Did this page help you?