https://github.com/webong/hngstellar
A simple express api connecting to stellar blockchain
https://github.com/webong/hngstellar
api-server blockchain expressjs stellar
Last synced: 27 days ago
JSON representation
A simple express api connecting to stellar blockchain
- Host: GitHub
- URL: https://github.com/webong/hngstellar
- Owner: webong
- Created: 2018-06-15T12:19:32.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T11:10:33.000Z (over 3 years ago)
- Last Synced: 2025-01-13T06:43:49.799Z (over 1 year ago)
- Topics: api-server, blockchain, expressjs, stellar
- Language: JavaScript
- Homepage:
- Size: 143 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hngstellar
This is a NodeJS api based on the Stellar JS SDK. All route endpoints are contained in app_server/routes/index.js. All controllers for the endpoints are contained in app_server/controllers/api.js. The useful endpoints are:
# /api/createAccount
This endpoint creates a Stellar account and funds it with 10,000 xlm, pays 9,999 xlm to the admin acct and returns a JSON response containing the account id and secret.
# /api/checkBalance/{account-id}
This endpoint returns the balance of a Stellar account, the account id is sent in the request url as a request parameter.
# /api/pay/{payer-secret}/{recipient-id}/{amount}
This endpoint transfers a specified amount from a payer's account to a recipient's account. The payer's secret, recipient account id and amount are sent as request parameters in the request url.