Giter Site home page Giter Site logo

elementsproject / nanotip Goto Github PK

View Code? Open in Web Editor NEW
85.0 12.0 12.0 36 KB

:zap: Lightning Tip Box :zap:

Home Page: https://blockstream.com/2018/03/24/tipping-on-lightning-with-nanotip-lapp.html

License: MIT License

JavaScript 72.96% HTML 27.04%
bitcoin lightning lightning-charge tip tips donations tip-jar micropayments nanopayments

nanotip's Introduction

nanotip

npm release MIT license Pull Requests Welcome IRC

A simple web server for accepting lightning donations.

nanotip generates Lightning invoices on the fly using your Lightning Charge server, allowing users to setup a tip jar that accepts Lightning Network payments.

Powered by โšก Lightning Charge.

nanotip demo

Setup

Setup Lightning Charge, then:

$ npm install -g nanotip
$ nanotipd --charge-token mySecretToken # defaults: --charge-url http://localhost:9112 --port 9115
nanotipd running on http://localhost:9115

Note that nanotip uses Lightning Charge's built-in checkout page, meaning that the Lightning Charge server has to be publicly accessible to users. If users need to access it using a different URL than the one used for communicating with the API, set --charge-public-url.

You can use --theme to pick a different theme from bootswatch.

CLI options

$ nanotipd --help

  Lightning Tip Box

  Usage
    $ nanotipd [options]

  Options
    -c, --charge-url <url>        lightning charge server url [default: http://localhost:9112]
    -t, --charge-token <token>    lightning charge access token [required]
    -P, --charge-public-url <url> url where charge is publicly accessible [default: {charge-url}]
    -m, --theme <name>            pick theme from bootswatch.com [default: yeti]
    -l, --title <name>            website title [default: Lightning Tip Box]
    -p, --port <port>             http server port [default: 9115]
    -i, --host <host>             http server listen address [default: 127.0.0.1]
    -u, --url <url>               http server public url (used for webhooks) [default: http://{host}:{port}]
    -T, --thankyou-url <url>      url to send users to after completing the payment [default: {url}/thankyou]
    -e, --node-env <env>          nodejs environment mode [default: production]
    -h, --help                    output usage information
    -v, --version                 output version number

  Example
    $ nanotipd -c http://localhost:9112 -t chargeSecretToken

License

MIT

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.