JSPM

substreams-sink-slack

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q14182F
  • License MIT OR Apache-2.0

Substreams slack sink module

Package Exports

  • substreams-sink-slack
  • substreams-sink-slack/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (substreams-sink-slack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Substreams Slack CLI Node.js

substreams-sink-slack is a tool that allows developers to pipe data extracted from a blockchain to the Slack messaging social platform.

📖 Documentation

Further resources

Protobuf

CLI

Use pre-built binaries

  • MacOS
  • Linux
  • Windows

Install globally via npm

$ npm install -g substreams-sink-slack

Run

$ 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 *.spkg from:
    • Load URL or IPFS
    • Read from *.spkg local filesystem
    • Read from substreams.yaml local filesystem
  • Handle cursor restart

Slack

  • Handle rate limit
  • Markdown message parsing