Giter Club home page Giter Club logo

ln-address-server's Introduction

Poor-man's lnaddress server

This is a super minimal implementation of lnurl pay and lnaddress to self-host. It's only meant for a few users and not a lot of traffic. As the ln wallet, we use phoenixd.

Using

It is strongly encoraged to run this behind a reverse-proxy like nginx

To use, just build it with rust, and then you'll need a folder with the json of each user you want to support. For example, create a users/ folder and create one json for each user. The json name should be user, where user is what will appear before the @ on the final address. So [email protected] should have a json called john (no .json). The content should be the following:

{
	"maxSendable": MAX_SENDABLE,
	"minSendable": MIN_SENDABLE,
	"tag": "payRequest",
	"metadata": "[[\"text/plain\",\"YOUR DESCRIPTION\"]]",
	"callback": "https://<CALLBACK ADDRESS>/callback"
}

Replace MIN_SENDABLE and MAX_SENDABLE with something like 1000 and 100000000 (in milisatoshis). YOUR DESCRIPTION is a short string that will be shown on the client before paying you. CALLBACK ADDRESS is the address where this software is hosted.

Here's an example:

{
	"maxSendable": 100000000,
	"minSendable": 1000,
	"tag": "payRequest",
	"metadata": "[[\"text/plain\",\"my ln address\"]]",
	"callback": "https://smith.com/callback"
}

After that, you need to start phoenixd and get the password from ~/.phoenix/phoenix.conf. You'll see a field like http-password=<PASSWORD>. Only copy the PASSWORD part. The start this with

$ ln-address <PASSWORD>

Run --help to see all options.

ln-address-server's People

Contributors

davidson-souza avatar

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.