Scorum
|
All plugins in the libraries/plugins
directory are iterated over by CMakeLists.txt
and placed in a CMake environment variable SCORUM_INTERNAL_PLUGINS
, which is used to create a runtime-accessible list of available plugins used by the argument parsing.
Similarly, external_plugins
is set aside for third-party plugins. Just drop plugin code into external_plugins
directory, make scorumd
, and the new plugin will be available.
There is a plugin in example_plugins
called hello_api
which is a working example of adding a custom API call.
enable-plugin
config file option.witness
and blockchain_history
in addition to the new plugins.blockchain_history
does). If you change whether such a plugin is disabled/enabled, you should also replay the chain. Detecting this situation and automatically replaying when needed will be implemented in a future release.public-api
option.database_api
and login_api
in addition to the new plugins.api-user
option allows for password protected access to an API.A skeleton structure containing much of the boilerplate of creating a new plugin with an API can be autogenerated by running programs/util/newplugin.py
.
plugin_startup()
(if needed)myplugin_api
class and reflect them in FC_API
declaration