Skip to content
Plugin that allows you to subscribe and be notified about any events
Branch: master
Clone or download
roks0n Merge pull request #4 from faustbrian/master
refactor: resolve plugins directly from the app container
Latest commit 71f621f Mar 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__ init Dec 20, 2018
lib refactor: resolve plugins directly from the app container Mar 12, 2019
.eslintignore
.eslintrc init Dec 20, 2018
.gitignore init Dec 20, 2018
LICENCE
README.md
jest.config.js
package.json
yarn.lock

README.md

Ark Notifier Plugin

This plugin calls webhooks when a certain events occurs. You can use it to post alerts on Slack, Discord, send Emails/SMS or use whichever service that supports webhooks.

Installation

Clone

cd ~/ark-core/plugins
git clone https://github.com/deadlock-delegate/notifier
lerna bootstrap

Registration

Open ~/.config/ark-core/{mainnet|devnet|testnet}/plugins.js and add the following at the end (it has to be bellow p2p and api).

'@deadlock/notifier': {}

like so:

module.exports = {
  '@arkecosystem/core-event-emitter': {},
  '@arkecosystem/core-config': {},
  ...
  '@deadlock/notifier': {
    enabled: true,
    webhooks: [{
      endpoint: 'https://discordapp.com/api/webhooks/612412465124612462/A1Ag12F&ijafa-3mtASA121mja',
      payload: {
        msg: 'content'
      },
      events: ['wallet.vote', 'wallet.unvote', 'forger.missing']
    }, {
      endpoint: 'https://hooks.slack.com/services/T1212ASDA/BAEWAS12/ASxASJL901ajkS',
      payload: {
        msg: 'text'
      },
      events: ['wallet.vote', 'wallet.unvote', 'forger.missing']
    }]
  }
}

Configuration

{
  enabled: true,  // true/false if you want to enable/disable the plugin
  webhooks: [{
    endpoint: 'webhook endpoint url',
    payload: {
      msg: 'name of the message field eg. discord has "content", slack has "text"'
    },
    events: ['list of events you want to subscribe to']
  }]
}

Events you can subscribe to

Handlers for unticked events haven't been implemented yet. Feel free to make a contribution.

  • wallet.vote
  • wallet.unvote
  • forger.missing
  • forger.failed
  • forger.started
  • block.applied
  • block.forged
  • block.reverted
  • delegate.registered
  • delegate.resigned
  • peer.added
  • peer.removed
  • transaction.applied
  • transaction.expired
  • transaction.forged
  • transaction.reverted

Credits

License

MIT © roks0n

You can’t perform that action at this time.