From 3a7e5645823dbfebe9f629fa1534406fbdd39700 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 4 Jan 2024 09:13:59 +0100 Subject: [PATCH] docs: update Node.JS example Fixes #8333 by not using the outdated `bytebuffer` library anymore. --- docs/grpc/javascript.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/grpc/javascript.md b/docs/grpc/javascript.md index f05b7eb94..9cf65f637 100644 --- a/docs/grpc/javascript.md +++ b/docs/grpc/javascript.md @@ -123,7 +123,7 @@ invoice. This example has a few dependencies: ```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 @@ -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 const async = require('async'); const _ = require('lodash'); -const ByteBuffer = require('bytebuffer'); let dest_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 let call = lightning.sendPayment();