An API providing key-value storage for Forta bots using JWT.
This software has not been audited or reviewed for security. It may contain vulnerabilities and is not recommended for use with real financial assets.
Use at your own risk.
The authors of this software are not responsible for any loss, damage, or liability resulting from its use.
To run the application locally with Docker Compose, follow these steps:
-
Build the Docker images:
docker-compose build --build-arg INSTALL_DEV=true
-
Start the services:
docker-compose up -d api ``
-
Run the test runner:
docker-compose run --rm test-runner
To run the application directly on your local machine using Node.js and a local Redis instance, follow these steps:
-
Install Node.js: Ensure you are using the correct version of Node.js specified in the
.nvmrc
file:nvm use
-
Set Up Environment Variables: Create a
.env
file from the.env.example
in the main directory with the following content. Modify the values as needed:# Application environment variables NODE_ENV=development NODE_PORT=8080 REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD=undefined ## API KEYS # Required VALUE_ZETTABLOCK_API_KEY= VALUE_ZENCHAIN_API_KEY= # Optional, to support all chains VALUE_ETHERSCAN_API_KEY= VALUE_OPTIMISTIC_API_KEY= VALUE_BSCSCAN_API_KEY= VALUE_POLYGONSCAN_API_KEY= VALUE_FANTOMSCAN_API_KEY= VALUE_ARBISCAN_API_KEY= VALUE_SNOWTRACE_API_KEY=
-
Install dependencies:
npm install
-
Start the application:
npm start
Make sure you have a local Redis instance running with the same configurations as specified in the .env
file.
Swagger documentation is available at http://localhost:NODE_PORT
after starting the application. You can use this documentation to explore and test the API endpoints interactively.