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(alby): add connect via settings #632 #640

Merged
merged 14 commits into from
Jul 30, 2023
Merged

Conversation

escapedcat
Copy link
Collaborator

@escapedcat escapedcat commented Jul 15, 2023

Resolves #632

Third Iteration

Current state

image

Second Iteration (outdated)

Alby installed

image image
  • Click will trigger the extension to add the raspiblitz LND account
  • Current images for detail page are just copied from lnbits

Alby not installed

image
  • Click will open getalby.com

Open points

  • If we decide for this approach, we need
    • 3 screenshots for the detail page
    • Different logo?
    • Copytext for "about" and "shortDescription"
    • See further texts in the "Files changed"-tab
  • Do people understand this will only add the LND account?
  • The approach might look better than the first one but is way more hacky. Could be improved though if this should be used (i.e. Alby function is just duplicated currently for the sake of PoC).

First Iteration (outdated)

image

First iteration.
Decided to go for settings because adding the account to the Alby extension doesn't feel like "Installing an App".
Open for suggestions though. At least this should work.

Could continue to iterate i.e.

  • adding more infos regarding Alby
  • adding logo
  • move to better place within the UI

@escapedcat escapedcat requested a review from cstenglein July 15, 2023 06:51
src/globals.d.ts Outdated Show resolved Hide resolved
@cstenglein
Copy link
Collaborator

Thank you 👍

Still on holiday for a week, will look into it in more detail afterwards.

Some suggestions:

You could add them as app in the app selection and instead of "open" use "connect".
I think you'll need more functionality in the app window logic then, which could be too much work. As alternative, you can kinda hard code stuff there.

If window.alby is not available, you could show an install button which opens the Firefox / chrome page.

@escapedcat escapedcat force-pushed the feat/632_alby-connect branch from 6906bff to 5022d1e Compare July 16, 2023 08:20
@escapedcat
Copy link
Collaborator Author

You could add them as app in the app selection and instead of "open" use "connect".

Done that now, have a look.

I think you'll need more functionality in the app window logic then, which could be too much work.

Tried that, doesn't match the current app pattern really because Alby is not an app you "install" on your raspiblitz.

As alternative, you can kinda hard code stuff there.

Did that now by copying the two main components.

@MoritzKa
Copy link

Thanks, Hannes, for tackling this issue.

  • adding the button to the "App" section makes sense. As a user I expect to find apps there that I can use together with my RaspiBlitz.
  • https://guides.getalby.com/alby-extension-apis also allows to add Core Lightning nodes, too. If you want to start with LND nodes that's fine.
  • Title could be: Alby Browser Extension
  • Subtitle/Description could be: Connect your RaspiBlitz LND node and use Bitcoin & Nostr apps with the Alby Extension.

@escapedcat
Copy link
Collaborator Author

escapedcat commented Jul 17, 2023

https://guides.getalby.com/alby-extension-apis also allows to add Core Lightning nodes, too. If you want to start with LND nodes that's fine.

According to the Alby source the commando-adapter needs:

  • host
  • pubkey
  • rune
  • port

You know how the data from this "Core Lightning" example do match these?:

  "cl_rest_zeus_connection_string": "lndconnect://d22y5z6mcvu3rwuenwle57pddng3l7pzkromquy6k3qw6gwmfh7z2.onion:443?macaroon=02010b632d6c696768746e696e67023753756e2041707220303320323032322032323a32343a353720474d542b303130302028427269746973682053756d6d652054696d652900000620f10755bc9f21fc4a20d927505c78b28bd8a4d35d93eb548fa8af1b80a1626b",
  "cl_rest_macaroon": "02010b632d6c696768746e696e670237556e2041707220303320323032322032323a32343a353720474d542b303130302028427269746973682053756d6d65722054696d652900000620f10755bc9f21fc4a20d927505c78b28b46d8a4d35d93eb548fa8af1b80a1626b",
  "cl_rest_onion": "d22y5z6mcvu3rwuenwle57pdd3l7pzkromquy6k3qw6gwmfh7z2.onion:443"

In the connector info it says "Create a rune by running 'lightning-cli commando-rune'." Should this be done by raspiblitz and added to the API data? Or am I missing something?

I adjusted the copy-text. Any preferences what to use for the three images in the detail section?

@escapedcat escapedcat force-pushed the feat/632_alby-connect branch from 7333fb5 to 54a3314 Compare July 18, 2023 02:55
@cstenglein
Copy link
Collaborator

Instead of the second Button which displays the info, I think we could just remove the screenshots and just display one button (the info button, which opens the alby page / connect button if alby installed).

@escapedcat escapedcat force-pushed the feat/632_alby-connect branch from 9cd012f to b6dd039 Compare July 25, 2023 04:15
Copy link
Collaborator

@cstenglein cstenglein left a comment

Choose a reason for hiding this comment

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

Thank you very much for the change!

Only some small comments. Tested it out, worked great :)

src/utils/availableApps.ts Outdated Show resolved Hide resolved
src/utils/__tests__/checkError.test.ts Show resolved Hide resolved
src/pages/Apps/AppCardAlby.tsx Outdated Show resolved Hide resolved
public/assets/apps/logos/alby.png Outdated Show resolved Hide resolved
@cstenglein
Copy link
Collaborator

@MoritzKa Just to make sure: It's fine if we use the Alby logo for the WebUI right? :)

@cstenglein
Copy link
Collaborator

@escapedcat Alby also got a SVG of their logo, maybe we could use that: https://github.com/getAlby/media/blob/main/alby-sticker.svg

Doesn't have a white background and would maybe fit better.

@escapedcat
Copy link
Collaborator Author

escapedcat commented Jul 28, 2023

Alby also got a SVG of their logo, maybe we could use that

Was using the png because all others boxes use pngs and AppIcon expecting a png.
Should we leave this for now and update all logos to SVGs later on?

Updated it to a transparent png.

@cstenglein
Copy link
Collaborator

@escapedcat approved, thank you very much 👍
You can merge whenever you want :)

@escapedcat escapedcat merged commit cdd3fe3 into master Jul 30, 2023
@escapedcat escapedcat deleted the feat/632_alby-connect branch July 30, 2023 03:46
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.

Let users connect to Alby directly from the Web UI
3 participants