Private
_feePrivate
_modulePrivate
_randomPrivate
Readonly
_registerPrivate
Readonly
_updatePrivate
Readonly
_updatePrivate
_validatorsA command is a group of state-transition logic triggered by a transaction and is identified by the module and command name of the transaction.
An endpoint is an interface between a module and an external system. Lisk endpoints support RPC communication. The module-specific RPC endpoints can be invoked by external services, like UIs, to get relevant data from the application.
Endpoints allow us to conveniently get data from the blockchain. It is never possible to set data / mutate the state via module endpoints.
Blockchain events, or module events, are logs of events that occur in the blockchain network during block execution. Events occur per block, and are stored in the respective block header, from where they can be queried.
A method is an interface for module-to-module communication, and can perform state mutations on the blockchain.
To get or set module-specific data in the blockchain, methods are either called by other modules or by the module itself.
For example, the transfer()
method from the Token module is called by a module, if it needs to transfer tokens from one account to the other.
In a module, the off-chain store is available in: insertAssets & Endpoints.
It complements the on-chain module store, by allowing to store various additional data in the blockchain client, that does not need to be included in the on-chain store.
The data stored in the off-chain store is not part of the blockchain protocol, and it may differ from machine to machine.
A module can define one or multiple on-chain stores, to store data in the blockchain, i.e. to include it in the blockchain state.
For example, data such as account balances, validator’s names, and multisignature keys are values that are stored in the on-chain module store.
The module name is the unique identifier for the module.
The module name is automatically calculated from the class name of the module:
The Module
suffix of the class name is removed, and the first character is converted to lowercase.
Optional
afterProtected
baseOptional
beforeOptional
beforeIf a module needs to access certain configuration options, it is required to validate and cache the respective configurations in the init()
method of a module.
The init() function is called for every registered module once, when the client is started.
The hook initGenesisState()
is called at the beginning of the genesis block execution.
Each module must initialize its state using an associated block asset.
Optional
insertThe metadata of a module provides information about the module to external services like UIs.
Optional
verifyOptional
verifyGenerated using TypeDoc
The
BaseModule
represents Lisk modules by providing a generic interface, from which each module extends from.