Skip to content

BostraDevelopment/paynode

Repository files navigation

This project objectives are :

1- Deploy an API, allowing users to : a) get a list of available tickers b) get informations for the available tickers (min. tx amount, min. fees, etc) c) convert amounts between tickers (ltc to btc, btc to sol, etc) AND from ticker to fiat (btc to eur, etc) I. ticker to fiat conversion requires the use of a public non-paid API or oracle d) generate payment address: I. user provide the ticker II. user provide a list of outputs addresses with percentage III. user provide a callback url - that'll be called when the payment is done - works as a uid e) get informations about a previously generated payment I. funds received & status II. funds forwarded & status

Endpoints design suggestion: a) GET /tickers returns: HTTP 200 {"results": [{"ticker": "btc", "name": "Bitcoin", "min_tx_amount": 0.0001, "min_fees": 0.0001, "decimals": 8}, ...]}

        HTTP 500
        {"error": "internal server error"}

b) GET /tickers/{ticker}
    returns:
        HTTP 200
        {"result": {"ticker": "btc", "name": "Bitcoin", "min_tx_amount": 0.0001, "min_fees": 0.0001, "decimals": 8}}

        HTTP 400
        {"error": "invalid ticker"}

        HTTP 500
        {"error": "internal server error"}

c) GET /tickers/{ticker}/convert-to/{ticker}/{amount}
    returns:
        HTTP 200 
        {"result": {"ticker": {"from": "btc", "to": "eur"}, "amount": {"from": 1, "to": 80000}}}

        HTTP 400
        {"error": "invalid ticker"}

        HTTP 500
        {"error": "internal server error"}

d) POST /tickers/{ticker}/generate-payment-address
    body: {"outputs": [{"address": "x", "percentage": 40}, {"address": "y", "percentage": 60}], "callback_url": "https://example.com/callback-and-uid"}
    returns: 
        HTTP 201
        {"result": {"payment_address": "z", "payment_uid": "ab67-cd69-ef420-gh88" "ticker": "btc", "inputs": {"minimum_coin": 0.0001}, "outputs": [{"address": "x", "percentage": 40}, {"address": "y", "percentage": 60}], "callback_url": "https://example.com/callback-and-uid"}}

        HTTP 400
        {"error": "invalid ticker"}
        {"error": "invalid percentage sum"} # Must be 100.00
        {"error": "one or more invalid output address"}

        HTTP 500
        {"error": "internal server error"}

e) GET /tickers/{ticker}/payment-address/{payment_address}?payment_uid={payment_uid}
    returns:
        HTTP 200
        {"result": {"payment_address": "z", "payment_uid": "ab67-cd69-ef420-gh88", "ticker": "btc", "inputs": {"minimum_coin": 0.0001, "logs": [{"amount": 0.02, "confirmations": 4, "status": "received"}]}, "outputs": [{"address": "x", "percentage": 40, "logs": [{"amount": 0.008, "confirmations": 4, "status": "sent"}]}, {"address": "y", "percentage": 60, "logs": [{"amount": 0.012, "confirmations": 4, "status": "sent"}]}], "callback_url": "https://example.com/callback-and-uid"}}

        HTTP 400
        {"error": "invalid ticker"}
        {"error": "invalid payment address"}

        HTTP 403
        {"error": "missing payment_uid"}

        HTTP 404
        {"error": "unknown payment address and/or payment uid"}

        HTTP 500
        {"error": "internal server error"}

2- Deploy a backend able to : a) get live blockchains data b) listen to the blockchain for all payments addresses c) call the callback url when funds are received d) forward the funds to the outputs addresses

3- Deploy a frontend able to : a) display the list of available tickers b) display the informations for the available tickers c) display the conversion between tickers d) display the payment address generation form e) display the informations about a previously generated payment

4- Deploy a database to store the data

5- Deploy a CI/CD pipeline to deploy the project

6- Deploy an extensive & powerful logging system

The project will be deployed on a VPS using docker compose. The project will be used by automated systems like autoshops. The project will be open source. The project will be documented. The project will be secured. The project will be scalable. The project will be maintainable. The project will be extensible. The project will be easy to use.

Language of backend development: GoLang, Python or C++ Language of api development: GoLang Language of frontend development: TypeScript with VueJS

Database: PostgreSQL

Internet exposure: via Cloudflare tunnel

Supported blockchains : All we can support. Must have: BTC, LTC, SOL. The project must be able to be easily extended to support more blockchains.

Wallet architecture : One wallet per chain, payment addresses are generated/derivated from the wallet.

Funds confirmations : 4 confirmations for BTC, LTC, SOL

Security : No KYC, No AML, No usage or access restrictions. No rate limits or anti-spam.

About

PayNode is a Crypto-Currency Payment Processor Service. It allows one to generate unique payment addresses and forward funds to specified wallet(s)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages