Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: commando connector #1577

Merged
merged 34 commits into from
Nov 9, 2022
Merged

feat: commando connector #1577

merged 34 commits into from
Nov 9, 2022

Conversation

kiwiidb
Copy link
Contributor

@kiwiidb kiwiidb commented Oct 6, 2022

Fixes #1390

Commando is implemented through the lnmessage library, thanks to @aaronbarnardsound. This library uses a websocket proxy (lnproxy.getalby.com) to communicate with a remote CLN node over the p2p port.

Features out of scope for this PR (but coming later):

  • Tor support
  • WebLN support for arbitrary CLN (+plugin) RPC calls
  • Finer grained permissions for WebLN calls
  • Stream network gossip to website over WebLN
  • I'm probably forgetting more awesome stuff

To test:

Instruction video to test on mainnet: https://www.loom.com/share/359f2cf7e4764950983859301b6e9ecc

@kiwiidb kiwiidb mentioned this pull request Oct 6, 2022
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

🚀 Thanks for the pull request!

Here are the current build files for testing:

Download and unzip the file for your browser. Refer to the readme for detailed install instructions.


This build is brought to you by: Adam Fiscor (who recently dropped 1337 sats):

The future is bright. We just have a lot of work to do.

Want to sponsor the next build? send some sats to ⚡️builds@getalby.com (don't forget to provide your name)

Don't forget: keep earning sats!

@socket-security
Copy link

socket-security bot commented Oct 24, 2022

Socket Security Pull Request Report

👍 No new dependency issues detected in pull request

Pull request report summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script confusion ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues
Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@2.4.2

⚠️ Please accept the latest app permissions to ensure bot commands work properly. Accept the new permissions here.

Powered by socket.dev

@kiwiidb kiwiidb changed the title feat: start commando connector feat: commando connector Oct 24, 2022
@kiwiidb kiwiidb marked this pull request as ready for review October 24, 2022 08:39
@escapedcat
Copy link
Contributor

bumi noticed: package-lock.json can be removed. We use yarn and yarn.lock.

Copy link
Collaborator

@bumi bumi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package-lock must not be in the repo. we use yarn.

@kiwiidb
Copy link
Contributor Author

kiwiidb commented Oct 26, 2022

Updated with fixes for some of @bumi 's remark. I don't know anything about the webpack/storyboard stuff though.

@@ -32,6 +32,12 @@ module.exports = {
],
include: path.resolve(__dirname, "../"),
});
config.module.rules.push({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with the following package.json keys:
source, main, unpkg, exports ?

packages that can run in different environments should publish the package valid for the different environments.

Does the build step need to be improved? https://github.com/aaronbarnardsound/lnmessage/blob/master/package.json#L14
tsc is not enough?

I don't know enough about the build setups in 2022, but I used microbundle recently in this package: https://github.com/getAlby/alby-tools/blob/master/package.json#L28

src/app/screens/connectors/ConnectCommando/index.tsx Outdated Show resolved Hide resolved
src/app/screens/connectors/ConnectCommando/index.tsx Outdated Show resolved Hide resolved
bumi and others added 2 commits November 1, 2022 10:30
# By Lisa Oppermann (15) and others
# Via GitHub (22) and others
* master: (57 commits)
  fix: publisher link on AllowanceView
  Translated using Weblate (Italian)
  Update all development Yarn dependencies (2022-10-29)
  fix: align reject/close function params
  fix: navigate on send
  Update dayjs to version 1.11.6
  fix: disable input fields on Create Invoice #1659 (#1668)
  Update react-i18next to version 12.0.0
  Push buttons to bottom in Send and Receive Screens (#1672)
  refactor(lnurl): getDetails - avoid typecasting (#1545)
  style: prettier
  Translated using Weblate (Italian)
  Update tailwindcss to version 3.2.1
  style: prettier
  Translated using Weblate (Portuguese (Brazil))
  style: prettier
  Translated using Weblate (Italian)
  Translated using Weblate (Swedish)
  fix: remove response and additional error message
  fix: use math floor everywhere
  ...

# Conflicts:
#	yarn.lock
@kiwiidb kiwiidb requested review from bumi and escapedcat November 4, 2022 12:16
@kiwiidb kiwiidb requested a review from reneaaron November 4, 2022 12:29
test: /\.m?js/,
resolve: {
fullySpecified: false
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@escapedcat what's the status here?
this still can not be removed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# By Adithya Vardhan (9) and others
# Via GitHub (19) and escapedcat (1)
* master: (34 commits)
  chore: fix lodash types and reduce package size
  chore: remove storybook github action
  chore: remove storybook stories
  chore: remove storybook config
  docs: adjust storybook info
  chore: remove storybook
  Translated using Weblate (Italian)
  fix: handle dexie in jest
  Update react-router-dom to version 6.4.3
  Update i18next-browser-languagedetector to version 7.0.1
  Update react-toastify to version 9.1.1
  fix: yarn lock
  fix: use transformIgnorePatterns for dexie
  chore: remove unused runcitadel sdk
  prettier i18nConfig.ts
  feat(i18n): activate italian
  feat: handle organization pages
  fix: highlight menu icon dots
  fix: tipping in medium
  fix: fetch from description element
  ...

# Conflicts:
#	.storybook/main.js
#	package.json
#	yarn.lock
@bumi bumi merged commit 9d213ce into master Nov 9, 2022
@bumi bumi deleted the feature/commando-connector branch November 9, 2022 16:04
bumi added a commit that referenced this pull request Nov 9, 2022
* master: (24 commits)
  feat: commando connector (#1577)
  chore: type the lnurl params
  chore: fix lodash types and reduce package size
  chore: remove storybook github action
  chore: remove storybook stories
  chore: remove storybook config
  docs: adjust storybook info
  chore: remove storybook
  Translated using Weblate (Italian)
  fix: handle dexie in jest
  Update react-router-dom to version 6.4.3
  Update i18next-browser-languagedetector to version 7.0.1
  Update react-toastify to version 9.1.1
  fix: yarn lock
  fix: use transformIgnorePatterns for dexie
  chore: remove unused runcitadel sdk
  prettier i18nConfig.ts
  feat(i18n): activate italian
  feat: handle organization pages
  fix: highlight menu icon dots
  ...
bumi added a commit that referenced this pull request Nov 10, 2022
# By Michael Bumann (10) and others
# Via GitHub (18) and others
* master: (38 commits)
  chore: update node version
  docs: add md line-break
  docs: remove nodenv support info
  chore: use node 18 in the GH workflows
  chore: default to the latest LTS version (when using nvm)
  chore: remove node version lock
  fix: decrease spacing between elements to fit into screen
  build(jest): compile lnmessage to avoid module issue
  feat: commando connector (#1577)
  chore: type the lnurl params
  chore: fix lodash types and reduce package size
  chore: remove storybook github action
  chore: remove storybook stories
  chore: remove storybook config
  docs: adjust storybook info
  chore: remove storybook
  Translated using Weblate (Italian)
  fix: handle dexie in jest
  Update react-router-dom to version 6.4.3
  Update i18next-browser-languagedetector to version 7.0.1
  ...

# Conflicts:
#	src/extension/background-script/connectors/index.ts
bumi added a commit that referenced this pull request Nov 10, 2022
# By Adithya Vardhan (8) and others
# Via GitHub (14) and others
* master: (25 commits)
  build(jest): compile lnmessage to avoid module issue
  feat: commando connector (#1577)
  chore: type the lnurl params
  chore: fix lodash types and reduce package size
  chore: remove storybook github action
  chore: remove storybook stories
  chore: remove storybook config
  docs: adjust storybook info
  chore: remove storybook
  Translated using Weblate (Italian)
  fix: handle dexie in jest
  Update react-router-dom to version 6.4.3
  Update i18next-browser-languagedetector to version 7.0.1
  Update react-toastify to version 9.1.1
  fix: yarn lock
  fix: use transformIgnorePatterns for dexie
  chore: remove unused runcitadel sdk
  prettier i18nConfig.ts
  feat(i18n): activate italian
  feat: handle organization pages
  ...

# Conflicts:
#	package.json
#	src/app/router/connectorRoutes.tsx
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commando (CLN) connector
4 participants