Skip to content
You are reading Hyperledger Besu development version documentation and some displayed features may not be available in the stable release. You can switch to stable version using the version box at screen bottom.
Last update: November 4, 2020

Plugin API interfaces

API interfaces in Hyperledger Besu allow users to build plugins to extend Besu functionality, such as the Quorum Besu plugins.

For more information about the available interfaces, see the Plugin API Javadoc.

Core plugin classes

The following table lists the interfaces providing core plugin classes.

Interface Description
BesuContext Allows plugins to access Besu services.
BesuPlugin Used to manage the plugin lifecycle.

Plugin services

The following table lists interfaces providing services you can retrieve.

Interface Description
BesuEvents Allows plugins to attach to events during Besu operation.
BesuConfiguration Provides file system locations of Besu’s storage.
IbftQueryService Allows query of the IBFT 2.0 aspects of the blockchain.
MetricCategoryRegistry Adds a new metrics category to the CLI.
MetricsSystem Register metrics with the Prometheus endpoint.
PoaQueryService Query the current state of Clique and IBFT 2.0 consensus protocols.
PicoCLIOptions Adds CLI commands to the Besu command line.
SecurityModuleService Allows plugins to register a security module.
StorageService Allows plugins to register as a storage engine. For example, to connect to a hardware security module (HSM).

To use the interfaces in your plugin, ensure the Gradle build file contains the repository and the plugin-api dependency.

Known issue

As indicated in issue #406, plugins may need to access the parsed command line during registration, but the command line is not yet initialized at this stage.

It’s in our roadmap to improve lifecycle steps and provide additional visibility for some data. A workaround is to create a supplier during the register step and store it in memory.

The start step can be ignored and your plugin module will be instanciated when the command line interface is parsed and available.

Questions or feedback? You can discuss issues and obtain free support on Hyperledger Besu chat channel.
For Hyperledger Besu community support, contact the mailing list