mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 10:09:08 +02:00
Merge pull request #8342 from guggero/js-doc-fix
docs: update Node.JS example
This commit is contained in:
@ -123,7 +123,7 @@ invoice.
|
|||||||
|
|
||||||
This example has a few dependencies:
|
This example has a few dependencies:
|
||||||
```shell
|
```shell
|
||||||
$ npm install --save async lodash bytebuffer
|
$ npm install --save async lodash
|
||||||
```
|
```
|
||||||
|
|
||||||
You can run the following in your shell or put it in a program and run it like
|
You can run the following in your shell or put it in a program and run it like
|
||||||
@ -133,10 +133,9 @@ You can run the following in your shell or put it in a program and run it like
|
|||||||
// Load some libraries specific to this example
|
// Load some libraries specific to this example
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const ByteBuffer = require('bytebuffer');
|
|
||||||
|
|
||||||
let dest_pubkey = <RECEIVER_ID_PUBKEY>;
|
let dest_pubkey = <RECEIVER_ID_PUBKEY>;
|
||||||
let dest_pubkey_bytes = ByteBuffer.fromHex(dest_pubkey);
|
let dest_pubkey_bytes = new Buffer(dest_pubkey, "hex");
|
||||||
|
|
||||||
// Set a listener on the bidirectional stream
|
// Set a listener on the bidirectional stream
|
||||||
let call = lightning.sendPayment();
|
let call = lightning.sendPayment();
|
||||||
|
Reference in New Issue
Block a user