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.

Updated on March 17, 2020

Plugins

You can extend Hyperledger Besu functionality by building Java plugins. Use the Plugin API to take data from any Besu network, public or permissioned, and feed it into an application or system.

For example, create a plugin to add more monitoring functionality or stream event data to a third-party application. The API exposes data about the following components:

  • Blocks
  • Balances
  • Transactions
  • Smart contracts
  • Execution results
  • Logs
  • Syncing state.

Besu Plugin API

The Plugin API provides access to interfaces allowing you to build the plugin.

Tip

View the Plugin API webinar for an example of how to build a plugin.

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

Install Plugins

To allow Besu to access and use the plugin, copy the plugin (.jar) to the plugins directory.

Important

If not already present, you must create the plugins directory one directory level below (../) the besu executable.

Each plugin in the directory has the following lifecycle events:

  • Register - Executed when Besu starts. Besu checks plugin compatibility and registers plugins.
  • Start - Plugins start after being successfully registered.
  • Stop - Besu stops plugins.

Note

The order in which Besu calls plugins during lifecycle events is not guaranteed.

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 besu@lists.hyperledger.org