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: app child key derived from wallet master key #736

Merged
merged 55 commits into from
Nov 7, 2024

Conversation

frnandu
Copy link
Contributor

@frnandu frnandu commented Oct 14, 2024

fixes #724
fixes #744

@frnandu frnandu changed the title app child key derived from wallet master key [WiP] app child key derived from wallet master key Oct 14, 2024
db/models.go Outdated Show resolved Hide resolved
nip47/event_handler.go Outdated Show resolved Hide resolved
nip47/event_handler.go Outdated Show resolved Hide resolved
nip47/event_handler.go Outdated Show resolved Hide resolved
service/start.go Outdated Show resolved Hide resolved
service/start.go Outdated Show resolved Hide resolved
@frnandu frnandu requested review from rolznz, bumi and reneaaron October 18, 2024 22:33
db/db_service.go Outdated Show resolved Hide resolved
db/db_service.go Outdated Show resolved Hide resolved
db/models.go Outdated Show resolved Hide resolved
db/db_service.go Outdated Show resolved Hide resolved
service/keys/keys.go Outdated Show resolved Hide resolved
service/keys/keys.go Outdated Show resolved Hide resolved
service/start.go Outdated Show resolved Hide resolved
service/start.go Outdated Show resolved Hide resolved
service/start.go Outdated Show resolved Hide resolved
service/keys/keys.go Outdated Show resolved Hide resolved
@@ -80,7 +80,8 @@ func (api *api) CreateApp(createAppRequest *CreateAppRequest) (*CreateAppRespons
expiresAt,
Copy link
Member

Choose a reason for hiding this comment

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

Follow-up issue: The expiresAt, scopes checks above are to be shifted to CreateApp method in apps_service and UpdateApp, GetApp, ListApps, TopupIsolatedApp methods need to be added there. I think we can also GetAppByPubkey directly in those methods so we don't have to call it separately in http_service and wails_service

Copy link
Contributor

Choose a reason for hiding this comment

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

@im-adithya could you create an issue and link some code?

nip47/event_handler.go Show resolved Hide resolved
nip47/publish_nip47_info.go Show resolved Hide resolved
nip47/nip47_service.go Show resolved Hide resolved
service/keys/keys.go Show resolved Hide resolved
service/delete_app_consumer.go Show resolved Hide resolved
@im-adithya
Copy link
Member

For some reason, if you do a fresh install (complete setup and go to Home page), the app isn't quitting on doing Ctrl+C

@frnandu
Copy link
Contributor Author

frnandu commented Nov 6, 2024

For some reason, if you do a fresh install (complete setup and go to Home page), the app isn't quitting on doing Ctrl+C

Oh sorry, I broke that when trying to handle relay.Context().Done() when there is no subscription on legacy app wallet pubKey.
Don't have much experience with go contexts, but I think it should be fixed now by using a select and handle both <-ctx.Done() and <-relay.Context().Done()
Let me know if you have a chance to re-test this and confirm it is working both doing Ctrl-C and by restarting a local test relay (should reconnect and re-subscribe each app).
Thanks for catching this!

@rolznz
Copy link
Contributor

rolznz commented Nov 7, 2024

For some reason, if you do a fresh install (complete setup and go to Home page), the app isn't quitting on doing Ctrl+C

Oh sorry, I broke that when trying to handle relay.Context().Done() when there is no subscription on legacy app wallet pubKey. Don't have much experience with go contexts, but I think it should be fixed now by using a select and handle both <-ctx.Done() and <-relay.Context().Done() Let me know if you have a chance to re-test this and confirm it is working both doing Ctrl-C and by restarting a local test relay (should reconnect and re-subscribe each app). Thanks for catching this!

@frnandu that sounds like a good solution. Thanks @im-adithya !

Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

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

tACK

@rolznz rolznz merged commit 5fdc803 into master Nov 7, 2024
8 of 9 checks passed
@rolznz rolznz deleted the feat/wallet-child-key-per-connection branch November 7, 2024 12:06
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.

rename App.NostrPubkey to App.AppPubKey Separate wallet key for each connection
4 participants