{"id":19001429,"url":"https://github.com/bumi/lnd-native-companion","last_synced_at":"2025-04-22T17:46:13.885Z","repository":{"id":55465888,"uuid":"324744510","full_name":"bumi/lnd-native-companion","owner":"bumi","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-27T00:12:25.000Z","size":535,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T08:59:20.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bumi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-27T11:14:26.000Z","updated_at":"2022-02-17T17:41:15.000Z","dependencies_parsed_at":"2022-08-15T01:00:45.736Z","dependency_job_id":null,"html_url":"https://github.com/bumi/lnd-native-companion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnd-native-companion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnd-native-companion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnd-native-companion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnd-native-companion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bumi","download_url":"https://codeload.github.com/bumi/lnd-native-companion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250289955,"owners_count":21406097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T18:11:09.396Z","updated_at":"2025-04-22T17:46:13.843Z","avatar_url":"https://github.com/bumi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LND Companion\n\nNative companion app for the [lightning browser extension](https://github.com/bumi/lightning-browser-extension) to connect to an LND node. \n\nUnder development!\n\n\n## Development\n\n### 1. Setup Electron\n\nI am currently not sure what's the best development setup for this.\n\nThe [native messaging host application](https://developer.chrome.com/docs/apps/nativeMessaging/#native-messaging-host-manifest) requires \na `path` to an executable to be specified. The browser communicates via stdin/stdout with the native companion. \n\nCurrenty I am using [prebuilt electron binaries](https://www.electronjs.org/docs/tutorial/application-distribution#with-prebuilt-binaries) to run it in development\n\nDownload the [prebuild binaries](https://github.com/electron/electron/releases) and clone this repository in a folder named `app` in the Electron's `resources` folder.\n\nOSX: \n```\nelectron/Electron.app/Contents/Resources/app/\n├── package.json\n├── index.js\n└── ...\n```\n\nWindows and Linux:\n```\nelectron/resources/app\n├── package.json\n├── index.js\n└── ...\n```\n\nThen use the absolute path to Electron.app on macOS, electron on Linux, or electron.exe on Windows in your host JSON file (joule.json).\n\nOn OSX you have to use the full path to the `Electron` executable in your Electron.app. For example: \n`/Users/bumi/src/lightning/lnd-native-companion/Electron.app/Contents/MacOS/Electron`\n\n\n### 2. Configure native messaging host\n\nCurrently I've only used Chrome for development.\n\nCopy or link the `joule.json` to `/etc/opt/chrome/native-messaging-hosts/joule.json` and configure the `path` as described above and check if the ID in the `allowed_origins` list matches with the ID of the browser extension.\n\n\n### 3. Run local react.js server\n\n    $ npm start\n\nThis should serve the frontend app on port 3000. \n\nDo not open the app in the browser. (it opens by default, just close it... it does not work in the browser)\n\n\n### Install the browser extension\n\nNow install the [lightning-browser-extension](https://github.com/bumi/lightning-browser-extension)\n\n\n## Logs\n\nWe use [electron-log](https://www.npmjs.com/package/electron-log) for logging. (you can not log to STDOUT because \nthat's how the browser communicates with the companion)\n\nBy default, it writes logs to the following locations:\n\non Linux: `~/.config/{app name}/logs/{process type}.log`\non macOS: `~/Library/Logs/{app name}/{process type}.log`\non Windows: `%USERPROFILE%\\AppData\\Roaming\\{app name}\\logs\\{process type}.log`\n\ne.g.\n\n    $ tail -f ~/.config/lnd-native-companion/logs/main.log ~/.config/lnd-native-companion/logs/renderer.log \n\n\n## HELP?\n\nThe setup and everything is still very rough. Please reach out or create an issue, I am happy to help. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbumi%2Flnd-native-companion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbumi%2Flnd-native-companion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbumi%2Flnd-native-companion/lists"}