Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@
- LIGHTNING_PATH: Path for core lightning (optional; required for entrypoint.sh)
- HIDDEN_SERVICE_URL: REST hidden service url (optional; for connect wallet screen; Used for Tor Domain also)
- COMMANDO_CONFIG: Full Path including file name for commando auth with PUBKEY & RUNE (required)
- LIGHTNING_WEBSOCKET_PORT: Core lightning's websocket port (required; from cln's config.json; starting with `bind-addr=ws:`)
- LIGHTNING_WEBSOCKET_PROTOCOL: Core lightning's web socket or web socket proxy (valid values: ws/wss, default: ws)
- LIGHTNING_WEBSOCKET_PORT: Core lightning's websocket port (required with default APP_CONNECT; from cln's config.json; starting with `bind-addr=ws:`/`wss-bind-addr`)
- LIGHTNING_REST_PROTOCOL: Protocol on which REST is served (valid values: http/https, default: https)
- LIGHTNING_REST_PORT: REST server port (required if APP_CONNECT is REST)
- LIGHTNING_CERTS_DIR: Path for core lightning certificates (Required if APP_CONNECT is REST/GRPC with PROTOCOL 'https')
- LIGHTNING_CERTS_DIR: Path for core lightning certificates (Required the PROTOCOL is 'https/wss')
- LIGHTNING_GRPC_PROTOCOL: Core lightning's GRPC protocol (valid values: http/https, default: http)
- LIGHTNING_GRPC_PORT: Core lightning's GRPC port (Required if APP_CONNECT is GRPC)
```
Expand Down
32 changes: 31 additions & 1 deletion apps/backend/source/shared/consts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as crypto from 'crypto';
import { join } from 'path';
import WebSocket from 'ws';
import fs from 'fs';

export enum Environment {
PRODUCTION = 'production',
Expand Down Expand Up @@ -54,6 +56,9 @@ export const APP_CONSTANTS = {
HIDDEN_SERVICE_URL: process.env.HIDDEN_SERVICE_URL || '',
LIGHTNING_NODE_TYPE: process.env.LIGHTNING_NODE_TYPE || NodeType.CLN,
COMMANDO_CONFIG: process.env.COMMANDO_CONFIG || './.commando-env',
LIGHTNING_CERTS_DIR:
process.env.LIGHTNING_CERTS_DIR || process.env.APP_CORE_LIGHTNING_CERTS_DIR || './certs',
LIGHTNING_WS_PROTOCOL: process.env.LIGHTNING_WEBSOCKET_PROTOCOL || 'ws',
LIGHTNING_WS_PORT: +(
process.env.LIGHTNING_WEBSOCKET_PORT ||
process.env.APP_CORE_LIGHTNING_WEBSOCKET_PORT ||
Expand Down Expand Up @@ -95,12 +100,37 @@ export const DEFAULT_CONFIG = {
password: '',
};

class SecureWebSocket extends WebSocket {
constructor(url: string) {
const options = {
rejectUnauthorized: false,
cert: fs.readFileSync(APP_CONSTANTS.LIGHTNING_CERTS_DIR + '/client.pem'),
key: fs.readFileSync(APP_CONSTANTS.LIGHTNING_CERTS_DIR + '/client-key.pem'),
};
super(url, options);
}
}

if (
APP_CONSTANTS.LIGHTNING_WS_PROTOCOL === 'wss' &&
typeof (globalThis as any).WebSocket === 'undefined'
) {
(globalThis as any).WebSocket = SecureWebSocket;
}

export const LN_MESSAGE_CONFIG = {
remoteNodePublicKey: '',
wsProxy: 'ws://' + APP_CONSTANTS.LIGHTNING_IP + ':' + APP_CONSTANTS.LIGHTNING_WS_PORT,
wsProxy:
APP_CONSTANTS.LIGHTNING_WS_PROTOCOL +
'://' +
APP_CONSTANTS.LIGHTNING_IP +
':' +
APP_CONSTANTS.LIGHTNING_WS_PORT,
ip: APP_CONSTANTS.LIGHTNING_IP,
port: APP_CONSTANTS.LIGHTNING_WS_PORT,
privateKey: crypto.randomBytes(32).toString('hex'),
socket: (url: string) =>
APP_CONSTANTS.LIGHTNING_WS_PROTOCOL === 'wss' ? new SecureWebSocket(url) : new WebSocket(url),
logger: {
info: APP_CONSTANTS.APP_MODE === Environment.PRODUCTION ? () => {} : console.info,
warn: APP_CONSTANTS.APP_MODE === Environment.PRODUCTION ? () => {} : console.warn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('ConnectWallet component ', () => {
expect(screen.getByTestId('host')).toHaveValue('user.local');
expect(screen.getByTestId('rune')).toHaveValue('mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j');
expect(screen.getByTestId('invoice-rune')).toHaveValue('aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
expect(screen.getByTestId('connect-url')).toHaveValue('ln-message://user.local:5001?rune=mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j&invoiceRune=aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
expect(screen.getByTestId('connect-url')).toHaveValue('ln-message://ws://user.local:5001?rune=mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j&invoiceRune=aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
expect(screen.queryByTestId('invoice-rune-spinner')).not.toBeInTheDocument();
});

Expand All @@ -51,10 +51,10 @@ describe('ConnectWallet component ', () => {
expect(screen.getByTestId('port')).toHaveValue('5001');
expect(screen.getByTestId('host')).toHaveValue('user.local');
expect(screen.getByTestId('rune')).toHaveValue('mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j');
expect(screen.queryByTestId('client-cert')).not.toBeInTheDocument();
expect(screen.queryByTestId('client-cert')).toBeInTheDocument();
expect(screen.queryByTestId('ca-cert')).not.toBeInTheDocument();
expect(screen.getByTestId('invoice-rune')).toHaveValue('aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
expect(screen.getByTestId('connect-url')).toHaveValue('ln-message://user.local:5001?rune=mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j&invoiceRune=aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
expect(screen.getByTestId('connect-url')).toHaveValue('ln-message://ws://user.local:5001?rune=mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j&invoiceRune=aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
});

it('updates selected network and input fields on network change to LN Message (Tor)', async () => {
Expand All @@ -65,10 +65,10 @@ describe('ConnectWallet component ', () => {
expect(screen.getByTestId('port')).toHaveValue('5001');
expect(screen.getByTestId('host')).toHaveValue('oqaer4kd7ufryngx6dsztovs4pnlmaouwmtkofjsd2m7pkq8wd.onion');
expect(screen.getByTestId('rune')).toHaveValue('mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j');
expect(screen.queryByTestId('client-cert')).not.toBeInTheDocument();
expect(screen.queryByTestId('ca-cert')).not.toBeInTheDocument();
expect(screen.queryByTestId('client-cert')).toBeInTheDocument();
expect(screen.queryByTestId('client-key')).toBeInTheDocument();
expect(screen.getByTestId('invoice-rune')).toHaveValue('aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
expect(screen.getByTestId('connect-url')).toHaveValue('ln-message://oqaer4kd7ufryngx6dsztovs4pnlmaouwmtkofjsd2m7pkq8wd.onion:5001?rune=mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j&invoiceRune=aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
expect(screen.getByTestId('connect-url')).toHaveValue('ln-message://ws://oqaer4kd7ufryngx6dsztovs4pnlmaouwmtkofjsd2m7pkq8wd.onion:5001?rune=mRXhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb24j&invoiceRune=aHFhnFyVWrRQChA9eJ01RQT9W502daqrP0JA4BiHHw89MCZGb3IgQXBwbGljYXRpb2==');
});

it('updates selected network and input fields on network change to REST', async () => {
Expand Down
28 changes: 16 additions & 12 deletions apps/frontend/src/components/modals/ConnectWallet/ConnectWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ConnectWallet = () => {
const [networkTypes, setNetworkTypes] = useState<string[]>(['LN Message', 'LN Message (Tor)']);
const [selNetwork, setSelNetwork] = useState('LN Message');
const [connectUrl, setConnectUrl] = useState('');
const initialConnectValues: ConnectWalletFields = { port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'DEVICE_DOMAIN_NAME' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } };
const initialConnectValues: ConnectWalletFields = { protocol: { title: 'WS Protocol', field: 'LIGHTNING_WS_PROTOCOL' }, port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'DEVICE_DOMAIN_NAME' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } };
const [connectValues, setConnectValues] = useState(initialConnectValues);
const [isLoadingInvoiceRune, setIsLoadingInvoiceRune] = useState(false);

Expand All @@ -43,13 +43,16 @@ const ConnectWallet = () => {
}
setNetworkTypes(newNetworkTypes);
if (selNetwork === 'LN Message') {
setConnectUrl('ln-message://' + connectWallet.DEVICE_DOMAIN_NAME + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
setConnectUrl('ln-message://' + connectWallet.LIGHTNING_WS_PROTOCOL + '://' + connectWallet.DEVICE_DOMAIN_NAME + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.LIGHTNING_WS_PROTOCOL?.toLowerCase() === 'wss' ? '&clientKey=' + connectWallet.CLIENT_KEY + '&clientCert=' + connectWallet.CLIENT_CERT : '') + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
}
}, [connectWallet, selNetwork]);

const copyHandler = (event) => {
let textToCopy = '';
switch (event.target.id) {
case 'WS Protocol':
textToCopy = connectWallet.LIGHTNING_WS_PROTOCOL?.toString() || '';
break;
case 'Websocket Port':
textToCopy = connectWallet.LIGHTNING_WS_PORT?.toString() || '';
break;
Expand Down Expand Up @@ -112,13 +115,13 @@ const ConnectWallet = () => {
setSelNetwork(event.target.id);
switch (event.target.id) {
case 'LN Message':
setConnectValues({ port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'DEVICE_DOMAIN_NAME' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } });
setConnectUrl('ln-message://' + connectWallet.DEVICE_DOMAIN_NAME + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
setConnectValues({ protocol: { title: 'WS Protocol', field: 'LIGHTNING_WS_PROTOCOL' }, port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'DEVICE_DOMAIN_NAME' }, clientKey: { title: 'Client Key', field: 'CLIENT_KEY' }, clientCert: { title: 'Client Cert', field: 'CLIENT_CERT' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } });
setConnectUrl('ln-message://' + connectWallet.LIGHTNING_WS_PROTOCOL + '://' + connectWallet.DEVICE_DOMAIN_NAME + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.LIGHTNING_WS_PROTOCOL?.toLowerCase() === 'wss' ? '&clientKey=' + connectWallet.CLIENT_KEY + '&clientCert=' + connectWallet.CLIENT_CERT : '') + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
break;

case 'LN Message (Tor)':
setConnectValues({ port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'TOR_SERVICE' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } });
setConnectUrl('ln-message://' + connectWallet.TOR_SERVICE + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
setConnectValues({ protocol: { title: 'WS Protocol', field: 'LIGHTNING_WS_PROTOCOL' }, port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'TOR_SERVICE' }, clientKey: { title: 'Client Key', field: 'CLIENT_KEY' }, clientCert: { title: 'Client Cert', field: 'CLIENT_CERT' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } });
setConnectUrl('ln-message://' + connectWallet.LIGHTNING_WS_PROTOCOL + '://' + connectWallet.TOR_SERVICE + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.LIGHTNING_WS_PROTOCOL?.toLowerCase() === 'wss' ? '&clientKey=' + connectWallet.CLIENT_KEY + '&clientCert=' + connectWallet.CLIENT_CERT : '') + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
break;

case 'REST':
Expand All @@ -142,8 +145,8 @@ const ConnectWallet = () => {
break;

default:
setConnectValues({ port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'DEVICE_DOMAIN_NAME' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } });
setConnectUrl('ln-message://' + connectWallet.DEVICE_DOMAIN_NAME + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
setConnectValues({ protocol: { title: 'WS Protocol', field: 'LIGHTNING_WS_PROTOCOL' }, port: { title: 'Websocket Port', field: 'LIGHTNING_WS_PORT' }, host: { title: 'CLN Host', field: 'DEVICE_DOMAIN_NAME' }, clientKey: { title: 'Client Key', field: 'CLIENT_KEY' }, clientCert: { title: 'Client Cert', field: 'CLIENT_CERT' }, rune: { title: 'Rune', field: 'COMMANDO_RUNE' }, invoiceRune: { title: 'Invoice Rune', field: 'INVOICE_RUNE' }, connectUrl: { title: 'Lnmessage URL', field: '' } });
setConnectUrl('ln-message://' + connectWallet.LIGHTNING_WS_PROTOCOL + '://' + connectWallet.DEVICE_DOMAIN_NAME + ':' + connectWallet.LIGHTNING_WS_PORT + '?rune=' + connectWallet.COMMANDO_RUNE + (connectWallet.LIGHTNING_WS_PROTOCOL?.toLowerCase() === 'wss' ? '&clientKey=' + connectWallet.CLIENT_KEY + '&clientCert=' + connectWallet.CLIENT_CERT : '') + (connectWallet.INVOICE_RUNE !== '' ? '&invoiceRune=' + connectWallet.INVOICE_RUNE : ''));
break;
}
};
Expand Down Expand Up @@ -188,7 +191,7 @@ const ConnectWallet = () => {
</h4>
</Row>
<Row className='d-flex align-items-start justify-content-center'>
<Col xs={selNetwork.includes('LN Message') ? 12 : 6}>
<Col xs={6}>
<Form.Label className='text-light'>Network</Form.Label>
<Dropdown className='dropdown-network mt-1 mb-2'>
<Dropdown.Toggle variant='secondary' id='network' className='w-100 d-flex align-items-center justify-content-between' data-testid='network-toggle'>
Expand All @@ -201,7 +204,7 @@ const ConnectWallet = () => {
</Dropdown.Menu>
</Dropdown>
</Col>
{!selNetwork.includes('LN Message') && connectValues.protocol ?
{connectValues.protocol ?
<Col xs={6}>
<Form.Label className='text-light'>{connectValues.protocol.title}</Form.Label>
<InputGroup className='mb-2'>
Expand Down Expand Up @@ -315,8 +318,9 @@ const ConnectWallet = () => {
</Col>
</Row>
)}
{(selNetwork.includes('REST') && connectWallet.LIGHTNING_REST_PROTOCOL?.toLowerCase() === 'https') ||
(selNetwork.includes('gRPC') && connectWallet.LIGHTNING_GRPC_PROTOCOL?.toLowerCase() === 'https') ?
{(connectWallet.LIGHTNING_WS_PROTOCOL?.toLowerCase() === 'wss' ||
connectWallet.LIGHTNING_REST_PROTOCOL?.toLowerCase() === 'https' ||
connectWallet.LIGHTNING_GRPC_PROTOCOL?.toLowerCase() === 'https') ?
<>
<Row className='d-flex align-items-start justify-content-center'>
<Col xs={12}>
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/types/root.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export type WalletConnect = {
TOR_SERVICE?: string;
LIGHTNING_NODE_TYPE?: string;
COMMANDO_CONFIG?: string;
LIGHTNING_WS_PROTOCOL?: string;
LIGHTNING_WS_PORT?: number;
LIGHTNING_REST_PROTOCOL?: string;
LIGHTNING_REST_PORT?: number;
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/utilities/test-utilities/mockData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export const mockConnectWallet = {
HIDDEN_SERVICE_URL: "http://oqaerkq7qd.onion",
LIGHTNING_NODE_TYPE: "CLN",
COMMANDO_CONFIG: "/home/network/.commando",
LIGHTNING_WS_PROTOCOL: "ws",
LIGHTNING_WS_PORT: 5001,
LIGHTNING_REST_PROTOCOL: "https",
LIGHTNING_REST_PORT: 3001,
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ services:
LIGHTNING_GRPC_PORT: ${LIGHTNING_GRPC_PORT}
LIGHTNING_REST_PORT: ${LIGHTNING_REST_PORT}
LIGHTNING_WEBSOCKET_PORT: ${LIGHTNING_WEBSOCKET_PORT}
APP_CORE_LIGHTNING_REST_CERT_DIR: ${APP_CORE_LIGHTNING_REST_CERT_DIR}
LIGHTNING_CERTS_DIR: ${LIGHTNING_CERTS_DIR}
HIDDEN_SERVICE_URL: http://${HIDDEN_SERVICE_URL}
LIGHTNING_PATH: ${LIGHTNING_PATH}
COMMANDO_CONFIG: ${COMMANDO_CONFIG}
Expand Down Expand Up @@ -113,7 +113,7 @@ services:
LIGHTNING_GRPC_PORT: ${LIGHTNING_GRPC_PORT}
LIGHTNING_REST_PORT: ${LIGHTNING_REST_PORT}
LIGHTNING_WEBSOCKET_PORT: 2116
APP_CORE_LIGHTNING_REST_CERT_DIR: ${APP_CORE_LIGHTNING_REST_CERT_DIR}
LIGHTNING_CERTS_DIR: ${LIGHTNING_CERTS_DIR}
HIDDEN_SERVICE_URL: http://${HIDDEN_SERVICE_URL}
LIGHTNING_PATH: ${LIGHTNING_PATH}
COMMANDO_CONFIG: ${COMMANDO_CONFIG}
Expand Down
6 changes: 4 additions & 2 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if [[ "$SETUP" == "docker" ]]; then
export LIGHTNING_IP="170.21.22.3"
export APP_IP="170.21.22.5"
export APP_CONFIG_DIR="/data/app"
export APP_CORE_LIGHTNING_REST_CERT_DIR="/c-lightning-rest/certs"
export LIGHTNING_CERTS_DIR="/data/.lightning/bitcoin"
export LIGHTNING_WEBSOCKET_PROTOCOL="ws"
export LIGHTNING_WEBSOCKET_PORT=2106
export APP_BITCOIN_RPC_USER="user"
export APP_BITCOIN_RPC_PASS="password"
Expand All @@ -36,7 +37,8 @@ else
export LIGHTNING_IP="localhost"
export APP_IP="127.0.0.1"
export APP_CONFIG_DIR="$PWD/data/app"
export APP_CORE_LIGHTNING_REST_CERT_DIR="$PWD/data/c-lightning-rest/certs"
export LIGHTNING_CERTS_DIR="/home/.lightning/l1-regtest/regtest"
export LIGHTNING_WEBSOCKET_PROTOCOL="ws"
export LIGHTNING_WEBSOCKET_PORT=5001
export LIGHTNING_GRPC_PORT=5002
export LIGHTNING_REST_PORT=3001
Expand Down