Page MenuHomePhabricator

README.md
No OneTemporary

README.md

# ecash-herald
A telegram bot to broadcast ecash chain activity
## development
To monitor the blockchain and send messages with your own telegram bot:
1. `npm i`
2. `cp secrets.sample.js secrets.js`
3. Get telegram bot API keys from https://t.me/BotFather
4. Create your own Telegram channel and invite your bot there.
5. Fill out `secrets.js` with information for your telegram bot and channel
6. `node index.js`
## working on the app
Because app performance is ultimately tied to the aesthetic readout of generated msgs, the actual format of generated messages must also be reviewed.
1. Get telegram bot API keys from https://t.me/BotFather
2. `cp secrets.sample.js secrets.js` and fill out with your Telegram bot information
3. To test changes to the app, run `npm run generateMock`. This will build and broadcast telegram msg strings for a mocked block containing txids listed in `scripts/generateMock`.
4. If your diff includes new features that are not covered by this mocked block, add relevant txids to the `txids` array in `scripts/generateMock.js`. You may also need to update `outputscriptInfoMap` and `tokenInfoMap` in `test/mocks/block.js`.
5. If test messages look good, run `npm test` to confirm all unit tests still pass
6. Run `npm run sendMsgByBlock <blockheight>` to review a msg for a specific block using live API calls

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 08:05 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4519972
Default Alt Text
README.md (1 KB)

Event Timeline