Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinax-network/substreams-sink-slack
Pipes data extracted from a blockchain to Slack
https://github.com/pinax-network/substreams-sink-slack
Last synced: about 1 month ago
JSON representation
Pipes data extracted from a blockchain to Slack
- Host: GitHub
- URL: https://github.com/pinax-network/substreams-sink-slack
- Owner: pinax-network
- License: apache-2.0
- Created: 2023-04-27T19:46:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-22T08:19:40.000Z (over 1 year ago)
- Last Synced: 2024-05-13T00:13:48.323Z (7 months ago)
- Language: TypeScript
- Size: 134 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-substreams - Slack Sink
README
# [`Substreams`](https://substreams.streamingfast.io/) [Slack](https://slack.com/) 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
- [**Substreams** documentation](https://substreams.streamingfast.io)
- [**Slack** API documentation](https://api.slack.com/automation)### Protobuf
- [`sf.substreams.entity.v1.EntityChanges`](https://github.com/streamingfast/substreams-entity-change/blob/develop/proto/entity/v1/entity.proto)
## CLI
[**Use pre-built binaries**](https://github.com/pinax-network/substreams-sink-slack/releases)
- [x] MacOS
- [x] Linux
- [x] Windows**Install** globally via npm
```
$ npm install -g substreams-sink-slack
```**Run**
```
$ substreams-sink-slack run [options]
```### Formatting
Supports `JSON` and `YAML` format for configuration file. Example of `config.json` format configuration file:```json
[
{
"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](https://slack.com/) channel or user with id `U0G9QF9C6`, as specified in the first json object.
## Features
### Substreams
- Consume `*.spkg` from:
- [x] Load URL or IPFS
- [ ] Read from `*.spkg` local filesystem
- [ ] Read from `substreams.yaml` local filesystem
- [x] Handle `cursor` restart### Slack
- [x] Handle rate limit
- [x] Markdown message parsing