Skip to content

cept73/digibyte-nownode

Repository files navigation

DigiByte payment verification system using NOWNodes

This is an example payment verification system using node.js and NOWNodes for the blockchain interface

You can contact NOWNodes and request a free personal API key to begin with, by visiting https://nownodes.io/pricing and clicking "Order now". You will need this API key to interface with their service.

You can then define how much you expect a user to pay for your service, for example 100 DGB (Or you can extend upon this library and make it dynamic, for example if you were taking payments for varying goods and services), and then once it notices the payment has been made it will validate and permit the user to proceed to the next step in the process.

Configuration

  1. Install Node v12

For Ubuntu:

   #!/bin/bash

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    sudo apt-get install -y nodejs
  1. Edit .env.example and put your NOWNodes API key in there, save it as .env
  2. Modify the example.js
  3. Install dependencies
    npm update && npm install
  4. Compile weak-napi
    cd node_modules/weak-napi && ./build && make
  5. Run
    npm start

About

example of use DigiByte using nownode service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •