Class BaseCommand<T>Abstract

The BaseCommand represents Lisk commands by providing a generic interface, from which each command extends from.

Type Parameters

  • T = unknown

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

events: NamedRegistry
schema: Schema = emptySchema
stores: NamedRegistry

Accessors

Methods

  • Applies the state changes of a command through the state machine. The hook Command.execute() is triggered by a transaction identified by the module name and the command name.

    Additionally, an event will be emitted that provides the information on whether a command is executed successfully or failed.

    In this hook, the state can be mutated and events can be emitted.

    If the command verification succeeded, but the hook execution fails, the transaction that triggered this command is still valid, however the state changes applied in this hook are reverted.

    Parameters

    Returns Promise<void>

Generated using TypeDoc