Client to access the main indexer service through the broker.

Hierarchy

  • MsClientWithEvents<Event>
    • ParserMsClient

Constructors

  • Parameters

    • broker: ServiceBroker

      The broker instance to retrieve the actual service from.

    • blockchains: Record<Blockchain, ParserClientI<any, any>>
    • clientEvents: boolean = false

      If true, the client will listen to the events of the service.

    • Optional eventOpts: EventOptions

      The event options

    • msId: MsIds = MsIds.Parser

      The moleculer service id of the indexer service.

    Returns ParserMsClient

Properties

_self: typeof MsClientWithEvents = ...
blockchains: Record<Blockchain, ParserClientI<any, any>>
broker: ServiceBroker

The broker instance to retrieve the actual service from.

clientEvents: boolean = false

If true, the client will listen to the events of the service.

eventOpts?: EventOptions

The event options

id: MsIds

The service type of the client.

initService: boolean = true

Whether to initialize the service on the broker.

msId: MsIds = MsIds.Parser

The moleculer service id of the indexer service.

Methods

  • Adds a hook to the given event.

    Parameters

    • eventId: string

      Event type to listen for.

    • handler: ((payload: any) => any)

      Function to call when event is emitted.

        • (payload: any): any
        • Parameters

          • payload: any

          Returns any

    Returns ParserMsClient

Generated using TypeDoc