An API to interact with KalyChain to buy KLC via AlchemyPay.
This API serves as a bridge between AlchemyPay and KalyChain, allowing users to purchase KLC tokens. It handles incoming webhooks from AlchemyPay, processes transactions, and communicates with the KalyChain network.
- Clone the Repository:
git clone https://github.com/kalycoinproject/klc-api.git
cd klc-api
-
Install Dependencies:
npm install
-
Environment Variables:
- Create a
.env
file in the root directory. - Add the necessary environment variables:
APP_SECRET=your_app_secret RPC_URL=your_rpc_url YOUR_JWT_TOKEN=your_jwt_token
- Start the API:
npm start
Please see localDev.md
- Webhook Handling: Processes incoming webhooks from AlchemyPay.
- Transaction Management: Sends transactions to the KalyChain network.
- Idempotency: Ensures that webhooks are processed only once.
- Error Handling & Retries: In case of transaction failures, the API retries up to 10 times at 60-second intervals.
If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
This project is licensed under the MIT License.
Developed by NicoDFS a.k.a TheDude.