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
|
1 year ago | |
---|---|---|
config | 1 year ago | |
docs | 1 year ago | |
node_modules | 1 year ago | |
src | 1 year ago | |
test | 1 year ago | |
.env.example | 1 year ago | |
.gitignore | 1 year ago | |
README.md | 1 year ago | |
package-lock.json | 1 year ago | |
package.json | 1 year ago | |
setup.sh | 1 year ago | |
simulateWebhook.js | 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
-
Clone the Repository:
git clone https://git.cipherlabs.org/TheDude/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
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.