A bridgechian plugin for forwarding real-time blockchain events through socket.io.
Supported blockchain events can be found here.
transaction.confirmed
fired when a transaction is confirmed for a configurable amount of times.systeminformation
fires system information like CPU, memory and filesystem stats at an configurable interval.network.latency
fires the stats of a HTTP request to measure latency in milliseconds at an configurable interval.blockheight.current
fires the current synced blockheight at an configurable interval.
Use these steps if you installed your node using Yarn.
yarn global add @foly/socket-event-forwarder
.- Customize the plugin configuration to your needs.
- Add the configuration to
~/.config/{bridgechain-core}/{mainnet|devnet|testnet}/app.json
at the bottom of relay.plugins. - Restart your relay process.
Use these steps if you installed your node using Git clone.
- Go to the plugin directory
cd ~/{bridgechain-core}/plugins
. - Clone the plugin
git clone https://github.com/e-m-s-y/socket-event-forwarder
. - Install and build the plugin
cd socket-event-forwarder && yarn install && yarn compile
. - Bootstrap the plugin using
cd .. && yarn bootstrap
. - Customize the plugin configuration to your needs.
- Add the configuration to
~/.config/{bridgechain-core}/{mainnet|devnet|testnet}/app.json
at the bottom of relay.plugins. - Restart your relay process.
{
"package": "@foly/socket-event-forwarder",
"options": {
"enabled": true,
"port": 3333,
"events": [
"block.applied",
"block.forged",
"round.applied",
"transaction.applied",
],
"confirmations": [1, 2, 3, 4, 5],
"customEvents": [
"transaction.confirmed",
"systeminformation",
"network.latency",
"blockheight.current"
],
"systeminformationInterval": 5000,
"networkLatencyInterval": 10000,
"blockheightCurrentInterval": 5000
}
}
Delegate friendsoflittleyus provides several public endpoints for you to use, check out our website for examples and additional information.