Closed rhuairahrighairidh closed 5 years ago
The current client plugin almost works out of the box with Zap Wallet's bundled lnd node. But requires a small change.
Zap's lnd node doesn't have an external ip address set. This doesn't stop it sending or receiving payments. But causes the plugin to error on connect.
It fails here: https://github.com/interledgerjs/ilp-plugin-lightning/blob/9efe1886b90aed5236e97fbb3ee77a1ddbb82031/src/account.ts#L265 Because uris field of getInfo is empty: https://github.com/interledgerjs/ilp-plugin-lightning/blob/9efe1886b90aed5236e97fbb3ee77a1ddbb82031/src/index.ts#L222
uris
getInfo
If the external ip isn't known, send just the lnd node's pubKey on connect (instead of the full pubKey plus host ip). Then don't add the client plugin's node as a peer.
Get credentials for Zap's bundled lnd (on macOS):
cat "~/Library/Application Support/Zap/lnd/bitcoin/testnet/<wallet name>/tls.cert" | base64
cat "~/Library/Application Support/Zap/lnd/bitcoin/testnet/<wallet name>/data/chain/bitcoin/testnet/admin.macaroon" | base64
localhost
11009
<wallet name> is usually wallet-1
<wallet name>
wallet-1
Create a channel in zap to the connector's lnd node.
Add a lnd.conf file here ~/Library/Application Support/Zap/lnd/bitcoin/testnet/<wallet name>/lnd.conf with the following:
lnd.conf
~/Library/Application Support/Zap/lnd/bitcoin/testnet/<wallet name>/lnd.conf
[Application Options] externalip=<any random ip address>
(restart zap)
Description
The current client plugin almost works out of the box with Zap Wallet's bundled lnd node. But requires a small change.
Zap's lnd node doesn't have an external ip address set. This doesn't stop it sending or receiving payments. But causes the plugin to error on connect.
It fails here: https://github.com/interledgerjs/ilp-plugin-lightning/blob/9efe1886b90aed5236e97fbb3ee77a1ddbb82031/src/account.ts#L265 Because
uris
field ofgetInfo
is empty: https://github.com/interledgerjs/ilp-plugin-lightning/blob/9efe1886b90aed5236e97fbb3ee77a1ddbb82031/src/index.ts#L222Possible fix
If the external ip isn't known, send just the lnd node's pubKey on connect (instead of the full pubKey plus host ip). Then don't add the client plugin's node as a peer.
Current workaround
Get credentials for Zap's bundled lnd (on macOS):
cat "~/Library/Application Support/Zap/lnd/bitcoin/testnet/<wallet name>/tls.cert" | base64
cat "~/Library/Application Support/Zap/lnd/bitcoin/testnet/<wallet name>/data/chain/bitcoin/testnet/admin.macaroon" | base64
localhost
11009
. Can be found here: https://github.com/LN-Zap/zap-desktop/blob/f096b01e0a6fb450596acf23a316cbf2d35f03bd/config/production.js#L5. Or by scanning for listening services on localhost ports.<wallet name>
is usuallywallet-1
Create a channel in zap to the connector's lnd node.
Add a
lnd.conf
file here~/Library/Application Support/Zap/lnd/bitcoin/testnet/<wallet name>/lnd.conf
with the following:(restart zap)