This repository contains a Node.js application with an Express API that allows users to track Algorand accounts and receive notifications when the state or balance of the tracked accounts changes.
-
Clone the repository:
git clone https://github.com/Megha-Dev-19/algorand-watcher-api.git cd algorand-watcher-api
-
Install dependencies:
npm install
POST /accounts/:address
Add an Algorand account to the watcher list. If the account is already in the list, a success message is returned.
GET /tracked-accounts/state-change
Check if the state of any tracked accounts has changed. If a change is detected, a notification is logged.
GET /tracked-accounts/balance-change
Check if the balance of any tracked accounts has changed. If a change is detected, a notification is logged.
GET /tracked-accounts
Retrieve a list of all tracked accounts with their state information.
To deploy the Algorand Watcher API, follow these steps:
-
Choose a Hosting Provider:
- Select a hosting provider such as AWS, Heroku, or DigitalOcean.
-
Build and Deploy:
- Build and deploy the application to your chosen hosting provider.
- Refer to the documentation of your hosting provider for specific deployment instructions.
npm test
Run tests to ensure the proper functioning of the API.
Note: This project runs a cron to execute state change and balance change APIs every 60 seconds.