A simple backend app for managing invoices and tracking their payments for the Monero cryptocurrency.

Overview

Simpla Vendejo API

This app runs a view-only Monero wallet to verify payments and keeps track of them in a MySQL database.

/create_invoice

  • Method: POST
  • Parameter: order_id (optional) A new row will be added to the MySQL table with a column for the order_id (a random one will be generated if not provided as POST data), a unique Monero subaddress, as well as null columns for "seen" and "10conf" indicating that no payment has been found on the blockchain.

/payment_status

  • Method: GET
  • Parameter: order_id Returns a JSON object with two values: seen and 10conf. If not null they should contain the amount of XMR found paid to the address associated with that order id.

Setup

The Database

This application will manage a single table in a MySQL database. The table will have a primary key column order_id, a column address with a unique subaddress associated with the order, a column seen storing the decimal value of XMR seen in the transaction pool associated with that order, as well as a column 10conf storing the decimal value of money found at least 10 blocks deep in the blockchain that is associated with the row's order.

After logging into your MySQL database, such a table can be created with the following query: CREATE TABLE payments (order_id INT PRIMARY KEY, address VARCHAR(95), seen DOUBLE, 10conf DOUBLE);

Creating a Monero wallet

This application will take a password protected Monero wallet .keys file containing a view-keypair to watch the blockchain for transactions paid to you. Monero wallet software can be found at https://www.getmonero.org/downloads/ and a guide to creating a new wallet can be found here and a guide to creating a view-only wallet can be found here. For security's sake, only a view-only wallet should be stored on the server machine.

The .env config

A .env file is used to quickly configure environment variables. An example has been provided in the root directory of this repo but you should edit it with the appropriate values for your server.

  • WALLET_FILE The path to your view-only wallet cache file. The .keys file should be in the same directory as the cache file.
  • WALLET_PWD The password for your view-only wallet.
  • MONERO_DAEMON_URI The uri to the monero node to use to verify payments on the blockchain. A third party node can be used but for commercial use it is highly recommended that you validate payments with your own instance of monerod.
  • DB_HOST The IP address of your MySQL database.
  • DB_USER The username to use to access the MySQL database.
  • DB_NAME The name of the database to use.

Running the node.js app

This app utilizes Node.js. After Node.js and NPM have been installed you can install this app's node module dependencies with npm install. The app can be run by executing node app.js

You might also like...

Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

May 18, 2022

Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

May 3, 2022

Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

Jan 3, 2023

A simple to-do app for managing daily tasks built with Webpack, JavaScript, HTML, and CSS with the functionality to manipulate multiple completed tasks and store them to local storage.

A simple to-do app for managing daily tasks built with Webpack, JavaScript, HTML, and CSS with the functionality to manipulate multiple completed tasks and store them to local storage.

TODO LIST APP In this project, I have built a simple HTML list of To Do tasks. The list is styled according to the listed specifications . This simple

Jun 7, 2022

This is simple To-Do App for managing the daily tasks and to keep track on tasks during the day.

This is simple To-Do App for managing the daily tasks and to keep track on tasks during the day.

Event Page Todo List. This is simple To-Do App for managing the daily tasks and to keep track on tasks during the day. Built With HTML CSS JavaScript

Mar 9, 2022

A simple To Do List application that allows users to save, edit, mark completed, and delete their to-dos, and save their list when application is closed. Build with JavaScript.

To Do List A simple To Do List online application that allows users to save, and manipulate their to-dos, and save their list when application is clos

Dec 20, 2022

YouPeriod.app -- the privacy-first period tracking app

YouPeriod.app The privacy-first period-tracking app. IMPORTANT: This app is still being developed. It's not ready for use yet, but will be soon. Pleas

Dec 17, 2022

This project is a To-do list app which users can store and edit their Todo Tasks. Users can also change the order of their todo

Project This project is about a todo app bundling using webpack Additional description about the project and its features. Built With HTML CSS Javascr

Jun 17, 2022
Owner
Ben Evanoff
Linguistics student at the University of Illinois at Urbana-Champaign
Ben Evanoff
A website for tracking community support for BIP21 QR codes that support on-chain and lightning bitcoin payments.

BIP21 Microsite This is a WIP microsite to promote the usage of a BIP21 payment URI QR code that can include lightning invoices or offers. Wallet supp

Stephen DeLorme 16 Nov 27, 2022
An API built for an invoices manager app using TypeScript and Prisma with Node and Express.

Invoices App API An API built for the invoices manager app using TypeScript and Prisma with Node and Express. Run locally To run locally, you need to

Waleed Alfaifi 4 Oct 17, 2022
🧾 My personal CLI app to manage my invoices via Web Scraping.

ALM Invoices CLI My personal CLI (Command Line Interface) app to manage my invoices via Web Scraping. WIP (Work in Progress): For now only the list co

Alexandre Marques 4 Nov 29, 2022
Web app that generates BOLT11 invoices from an LNURL or Lightning Address.

LNURL Pay ⚡️ Web app that generates BOLT11 invoices from an LNURL or Lightning Address. Getting Started First, run the development server: npm run dev

Sam Samskies 7 Nov 3, 2022
See a banned user's profile, their friends, their favorite games, their followers etc.

Roblox-Banned-User-Viewer AKA BanView See a banned user's profile, their friends, their favorite games, their followers etc. Ever wondered how to view

SCR1PP3D 4 Nov 18, 2022
This is an imitation of the Amazon online shopping store. Users can add and remove items from the cart, proceed to checkout and make payments.

AMAZON This is an imitation of the Amazon online shopping store. Users can add and remove items from the cart, proceed to checkout and make payments.

Kevv_in 7 Mar 23, 2022
Receive crypto payments from anywhere around the world, options including native tokens (MATIC, ETHER,BUSD), Tokens (USDT,BUSD), NFTs and more.

Receive payments for service rendered in crypto using different options. Go borderless with bonpay, gain access to varities of crypto assets, safe and

Johnson awah Alfred 6 Nov 11, 2022
Lazerpay SDK allows you accept payments easily in your react application

Lazerpay Official react sdk Lazerpay SDK allows you accept payments easily in your react application Installation npm install lazerpay-react Usage imp

LazerPay 18 Nov 20, 2022