Skip to content

Instantly share code, notes, and snippets.

@alexbosworth
Created April 12, 2019 04:09
Show Gist options
  • Save alexbosworth/ccd701f7535d7a48045f1fafae5fd31a to your computer and use it in GitHub Desktop.
Save alexbosworth/ccd701f7535d7a48045f1fafae5fd31a to your computer and use it in GitHub Desktop.
const sub = lnd.sendPayment();
sub.on('error', err => {
console.log("ERR", err);
})
sub.on('end', () => console.log("END"));
sub.on('status', status => console.log("STATUS", status));
sub.on('data', data => {
console.log("PAYMENT", data);
})
sub.write(params);
setTimeout(() => {
sub.end();
},
3000);
return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment