npm.io
1.4.0 • Published 4 years ago

lightning-hackday-slashtags-pay

Licence
Version
1.4.0
Deps
11
Size
6 kB
Vulns
0
Weekly
0

lightning-hackday-slashtags-pay

Install

npm i lightning-hackday-slashtags-pay

Usage

Server side
import { slashtagsPayServer } from './index.js';

const lnNodeResponse = (request = { amount: 100, description: 'foo' }) => {
  console.log('got request', request);
  return 'this is an ln invoice for ' + JSON.stringify(request);
};

const slashtag = slahtagsPayServer(lnNodeResponse);
Client side
import { slashtagsPayClient } from './index.js';
// Pass the slashtag to the client side somehow
const response = await slashtagsPayClient(slashtag);