0.1.0 • Published 3 years ago
substreams-sink-slack v0.1.0
Substreams Slack CLI Node.js
substreams-sink-slackis a tool that allows developers to pipe data extracted from a blockchain to the Slack messaging social platform.
📖 Documentation
Further resources
Protobuf
CLI
- MacOS
- Linux
- Windows
Install globally via npm
$ npm install -g substreams-sink-slackRun
$ substreams-sink-slack run [options] <spkg>Formatting
Supports JSON and YAML format for configuration file. Example of config.json format configuration file:
[
{
"entity": "Transfer",
"chat_ids": [
"U0G9QF9C6"
],
"message": "This *{user_id}* made a _transaction_ with id `{trx_id}`"
},
{
"entity": "Grants",
"chat": [
"U0G9QF9C6"
],
"message": "This `{grant}`"
}
]Text between {} are field names and are used as labels for message templating. In the example above, all EntityChanges messages coming from the substream with entity key having Transfer as value, will be sent to Slack channel or user with id U0G9QF9C6, as specified in the first json object.
Features
Substreams
- Consume
*.spkgfrom:- Load URL or IPFS
- Read from
*.spkglocal filesystem - Read from
substreams.yamllocal filesystem
- Handle
cursorrestart
Slack
- Handle rate limit
- Markdown message parsing