Skip to main content

Install events-into-stdout plugin into headless wallet

Goal

This article will guide you to install the events-into-stdout plugin into Hathor headless wallet.

The events-into-stdout plugin is part of the external notification feature. To know more about this feature, see Hathor external notifications.

Requirement

Hathor headless wallet \ge v0.19.0

Step-by-step

  1. Configure and enable the plugin.

Step 1: configure and enable the plugin

If you installed Hathor headless wallet from source code, you must append the src/config.js file and the command to start the application, to respectively enable and configure the plugin:

  1. Open the command line from the directory where you installed Hathor headless wallet.
  2. Open the src/config.js file.
  3. Add 'debug' to the array of values of the enabled_plugins property to enable the plugin.

If you are enabling multiple plugins, value shall be an array of plugin ids: enabled_plugins: ['PluginId1', 'PluginId2', ...].

At the end of this substep, the config.js file will be as follows:

hathor-wallet-headless/src/config.js
module.exports = {

...

enabled_plugins: ['debug'],

plugin_config: {},

...

};

Note that some of the messages may be longer than 1000 characters. Such long messages make stdout non-human readable, defeating thus the debugging purpose of the plugin.

  1. (Optional) Choose one of the following behaviors for the plugin to handle the long messages:
  • Default behavior: cut long messages to avoid the problem.
  • all: log completed long messages.
  • off: completely turn off the log of long messages.

If, in the previous substep, you chose to leave the default behavior, you may start the wallet application with the usual command.

  1. (Optional) On the other hand, if in the previous substep you chose to alter the plugin default behavior, you must append the --plugin_debug_long <all_or_off> parameter to the command to start the wallet application, replacing the <all_or_off> placeholder with your chosen value:
npm start -- --plugin_debug_long <all_or_off>

Task completed

You have installed the events-into-stdout plugin in your instance of Hathor headless wallet.

The events-into-stdout plugin is part of the external notification feature. To know how to use this plugin or install other plugins of this feature, see Hathor external notifications.