Skip to content

nbd-wtf/js-lnurl

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

js-lnurl

Tools for adding lnurl support in JavaScript wallet interfaces.

Example

import { getParams } from 'js-lnurl'

getParams("LNURL1...")
  .then(params => {
    switch (params.tag) {
      case 'withdrawRequest':
        // tag: string
        // k1: string
        // callback: string
        // domain: string
        // minWithdrawable: number
        // maxWithdrawable: number
        // defaultDescription: string
        break
      case 'payRequest':
        // tag: string
        // callback: string
        // domain: string
        // minSendable: number
        // maxSendable: number
        // metadata: string
        // decodedMetadata: string[][]
        // commentAllowed?: number
        break
      case 'login':
        // tag: string
        // k1: string
        // callback: string
        // domain: string
        break
      case 'channelRequest':
        // params.tag: string
        // params.callback: string
        // params.domain: string
        // params.k1: string
        // params.uri: string
        break
    }
  })

Other included helpers

import { findlnurl, decipherAES, getDomain }

// see ./helpers.js

How to build

Do this before publishing to npm:

yarn
make

About

tools for adding lnurl support in a wallet

Resources

Stars

Watchers

Forks

Packages

No packages published