import{slashtagsPayServer}from'./index.js';constlnNodeResponse=(request={amount: 100,description: 'foo'})=>{console.log('got request',request);return'this is an ln invoice for '+JSON.stringify(request);};constslashtag=slahtagsPayServer(lnNodeResponse);
Client side
import{slashtagsPayClient}from'./index.js';// Pass the slashtag to the client side somehowconstresponse=awaitslashtagsPayClient(slashtag);