An API to interact with KalyChain to buy KLC via AlchemyPay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
TheDude 742c543600 logging 1 year ago
docs docs 1 year ago
node_modules tests 1 year ago
src logging 1 year ago
test tests 1 year ago
.env init 1 year ago
README.md init 1 year ago
package-lock.json tests 1 year ago
package.json logging 1 year ago

README.md

KLC API

An API to interact with KalyChain to buy KLC via AlchemyPay.

Description

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.

Setup & Installation

  1. Clone the Repository: git clone https://git.cipherlabs.org/TheDude/klc-api.git cd klc-api

  2. Install Dependencies: npm install

  3. 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
    
  1. Start the API: npm start

Features

  • 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.

Contributing

If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.

License

This project is licensed under the MIT License.

Credits

Developed by NicoDFS a.k.a TheDude.