Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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