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: Wails (v2) #217

Closed
wants to merge 216 commits into from
Closed

Feat: Wails (v2) #217

wants to merge 216 commits into from

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Jan 15, 2024

This PR allows NWC to be run in multiple formats:

  • HTTP server
  • Wails desktop app

The LN backend can be initialized after startup, allowing the user to choose and configure their node.

THIS IS NOT BACKWARD COMPATIBLE. POSTGRES IS BEING REMOVED, SQLITE REQUIRES A FRESH DB.

Post-merge: update Github to point at master branch

TODOs:

  • merge single-user cleanup PR
  • React app now doesn't build if wails files don't exist - maybe we do need to do a dynamic import for the request code? - @bumi
  • fix redirection to setup page (currently can't even visit about page) - fixed in onboarding branch
  • fix redirection when node is not started yet (should not be able to access apps) and when node is not setup (should not be able to access start) - fixed in onboarding branch
  • handle requests made before LNClient starts up - should return an error code if svc.lnClient is nil - @im-adithya - cannot be done
  • fix failing workflow build - @frnandu
  • remove legacy handling for apps without permissions - Roland
  • Service refactor - Roland
    • move "api" methods to separate object (Currently in "Service" object) - Roland
    • move echo_handlers methods to separate object (Currently in "Service" object) - Roland
    • cleanup main/service files (both now have service methods) - Roland
  • Add logging for wails app @bumi
  • Add encryption of config table - Bumi
  • Make sure created_at/updated_at fields in DB are still working - Roland
  • Onboarding - set unlock password - fixed in onboarding branch
  • Unlock screen (HTTP mode or possibly a lock timer for Wails) to access admin panel - Roland - in unlock screen PR
  • Password check (currently cannot distinguish if node cannot be connected or password is wrong) - in unlock screen PR
  • Infinite retry for unable to connect to relay
  • Do not try to decode keysends - Roland
  • Address Add a replies table to store reply events #231 - @im-adithya (5ee1dfc)
  • Remove ReceivedEOS check - wait for eos before executing next go subroutine - Adithya
  • Add new master branch and change target branch to master. main will not be updated
  • graceful exit when closed
  • Remove Alby LNClient - Roland
  • Remove multi-user code - Roland
  • Remove datadog etc which are not needed in self-custodial setup - Roland
  • add connecting state on submit button when POSTing to /api/setup
  • fix wails app routing
  • setupCompleted in info response
  • DB to store config
  • save config to db
  • review setup link in navbar - what should the UX be like? is it ok for now?
  • merge .env and database config - app should always look at database config. If unset, take from env and set at init.
  • Review db format which is currently key/value - or should it have one column per config entry so we can share the Go object?
  • Setup page
    • Breez
    • LND
  • document how to do production build
  • better way to determine if launched in wails mode - there should be 2 entrypoints, with correct one set at build-time
  • test production build
  • frontend request abstraction for wails vs http
    • basic abstraction
    • support all request methods
    • body in the request
    • error handling
  • breez - create user if doesn't exist
  • wails go request router
  • remove dependency on echo from LND LNBackend
  • review if changes to dockerfile are needed due to go build tags - not needed
  • add breez api key to setup form
  • make Windows version of build/run commands (cp in yarn commands do not work)
  • testing
    • HTTP app type
      • LND
      • Breez
    • WAILS app type
      • LND
      • Breez
  • manual build testing
    • Linux
    • Mac
    • Windows
  • release with manual wails builds available for
    • Mac
    • Linux
    • Windows

To move to seperate issues:

  • improve onboarding page UI
  • add NIP-47 Supported Methods for Breez (e.g. lookup invoice right now only supports payment hash and only works for settled invoices)
  • Improve UX for starting without internet connection (what happens if start fails, is there a try again button?)
  • welcome does not show if LND configuration is set in .env

kiwiidb and others added 30 commits August 25, 2023 10:55
This makes it possible to host a NWC instance on a public network with simple authentication
which is potentially smaller?
# By Roland Bewick (20) and others
# Via GitHub (13) and others
* main: (38 commits)
  chore: add dependabot
  feat: add support both internal and public relay URL
  fix: relay public url
  fix: expiresAt and maxAmount handling
  fix: app expiresAt handling
  fix: style for darkmode
  chore: correctly handle query parameters in new UI (WIP)
  chore: rename app name parameter (#154)
  fix: navbar padding on lg
  fix: ui cleanup
  no more default protocol-redirect (#107)
  ui improvements & layout simplification (#153)
  feat: nwc connection page ui (#151)
  chore: address migration feedback
  chore: format with prettier
  feat: run css scripts via npm
  chore: add human-readable name to migration ids
  feat: add manual migrations using gormigration
  fix: don't log resp id
  fix: convert expiresAt to int
  ...

# Conflicts:
#	main.go
* feature/breez-backend: (38 commits)
  chore: add dependabot
  feat: add support both internal and public relay URL
  fix: relay public url
  fix: expiresAt and maxAmount handling
  fix: app expiresAt handling
  fix: style for darkmode
  chore: correctly handle query parameters in new UI (WIP)
  chore: rename app name parameter (#154)
  fix: navbar padding on lg
  fix: ui cleanup
  no more default protocol-redirect (#107)
  ui improvements & layout simplification (#153)
  feat: nwc connection page ui (#151)
  chore: address migration feedback
  chore: format with prettier
  feat: run css scripts via npm
  chore: add human-readable name to migration ids
  feat: add manual migrations using gormigration
  fix: don't log resp id
  fix: convert expiresAt to int
  ...
# By Roland Bewick (28) and others
# Via GitHub (8) and others
* main: (51 commits)
  fix: only set preimage on transaction if Alby invoice is settled
  fix: mark make_invoice expiry unsupported in alby LNClient
  chore: update invoice functions to match NIP-46 extensions spec
  chore: remove unnecessary env file
  fix: do not return failed LND payments in list_transactions
  fix: LND listTransactions
  fix: map alby transaction amount as millisats
  fix: map alby invoice to nip47 invoice
  chore: rename types and add TODOs
  fix: tests
  chore: comment out unused code
  chore: add list_transactions to NIP_47_CAPABILITIES
  fix: lnd keysend
  chore: also log preimage
  fix: keysend request permission method and convert millisats to sats
  fix: remove unnecessary permission creation in test
  chore: use pay_invoice permissions
  fix: timestamp in test
  chore: further changes and test
  chore: minor fixes
  ...

# Conflicts:
#	service.go
rolznz and others added 23 commits January 30, 2024 19:14
otherwise the NWC payload is too big
we need to add pagination later
# Conflicts:
#	.github/workflows/workflow.yaml
@rolznz rolznz marked this pull request as ready for review February 1, 2024 15:40
@rolznz
Copy link
Contributor Author

rolznz commented Feb 2, 2024

Moved to getAlby#1

@rolznz rolznz closed this Feb 2, 2024
rolznz added a commit to getAlby/nostr-wallet-connect-next that referenced this pull request Jul 8, 2024
Breaking change:
- Wails app default directory is now `albyhub`, not `alby-nwc`
- Wails mac filename is `albyhub` not `AlbyHub` just to be consistent
everywhere
- ~~Wails app executable is now `albyhub`, not `Nostr-Wallet-Connect`~~
_EDIT: we override the output filename in the action, so no change_

Other changes:
- RPI links go to getalby.com zero links instead of this repository
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.

5 participants