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 8dd62cb6c9 genesis testnet 1 year ago
config genesis testnet 1 year ago
docs PATH 1 year ago
node_modules updates 1 year ago
src updates 1 year ago
test updates 1 year ago
.env.example updates 1 year ago
.gitignore updates 1 year ago
README.md init 1 year ago
package-lock.json updates 1 year ago
package.json updates 1 year ago
setup.sh PATH 1 year ago
simulateWebhook.js updates 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.