Giter VIP home page Giter VIP logo

hedera-payments's Introduction

Hedera Coin Payments API

This repository contains a simple API for integrating Hedera Coin payments into your application. With this API, you can easily send and receive payments using Hedera's native cryptocurrency, HBAR.

Prerequisites

Before you can use this API, you will need to sign up for a Hedera account and obtain API keys. These keys will allow you to authenticate your API requests and access the payment functionality.

Getting Started

To get started with the Hedera Coin Payments API, you will need to clone this repository and install the required dependencies.

git clone https://github.com/falcucci/hedera-coin-payments-api.git
cd hedera-coin-payments-api
npm install

Next, you will need to configure the API by setting your Hedera API keys in the .env file.

# .env
HEDERA_PUBLIC_KEY=<your-public-key>
HEDERA_PRIVATE_KEY=<your-private-key>

Once you have configured the API, you can start the server by running the following command:

npm start

The API will be running at http://localhost:3000.

API Endpoints

The Hedera Coin Payments API provides the following endpoints:

POST /payment: Send a payment to a specific address.

GET /balance/:accountId: Check the balance of a specific account.

GET /transactions/:accountId: Retrieve a list of transactions for a specific account.

Examples

Here are some examples of how to use the API:

Send a payment
curl -X POST -H "Content-Type: application/json" -d '{"to": "3f9a07d83c604dba400d13df4d3456", "amount": 100}' http://localhost:3000/payment
Check the balance
curl http://localhost:3000/balance/3f9a07d83c604dba400d13df4d3456
Get the transactions
curl http://localhost:3000/transactions/3f9a07d83c604dba400d13df4d3456

Contributing

If you would like to contribute to the development of this API, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

hedera-payments's People

Contributors

falcucci avatar

Stargazers

Roman avatar Pedro Henrique Fernandes Dias avatar Guilherme Esteves avatar Pedro Galetti avatar Rafael T. Akiyama avatar Matheus Mendes Silva avatar Rust Oceans avatar Moises Marangoni avatar  avatar

Watchers

Moises Marangoni avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.