coracle-social/coracle

NIP 55 Support

Closed this issue · 6 comments

  • Create (or use an existing) capacitor plugin that accesses the intent API
  • Add Nip55Signer to @welshman/signer with dependency injection for sending/receiving intents based on an interface
  • Add support to @welshman/app's getSigner function
  • Add "log in with amber" button to log in screen (make sure columns align)
  • Test in emulator

Some links:

https://github.com/nostr-protocol/nips/blob/master/55.md
https://github.com/IT-MikeS/capacitor-intents
https://github.com/hzrd149/nostrudel/blob/eaed508fe1d7a4642ebaef91f0b633059d8710fa/src/classes/signers/amber-signer.ts

Bounty: 500k sats + 200k sats

I did quite a bit of work with intents for a navigation app for the blind that I've contributed to, I'd be interested in taking this issue on

https://github.com/chebizarro/nostr-signer-capacitor-plugin

  • Add Nip55Signer to @welshman/signer with dependency injection for sending/receiving intents based on an interface
  • Add support to @welshman/app's getSigner function

https://github.com/chebizarro/welshman/tree/issue%23421

  • Add "log in with amber" button to log in screen (make sure columns align)

https://github.com/chebizarro/coracle/tree/issue%23421

  • Test in emulator
nostr_signer_android.webm

The work is spread out over three repos, I can make pull requests on the main branches of the coracle and welshman repos once it is more thoroughly tested or I can make them now in their current state for you to test further, as you like it.

This is awesome, great work. Go ahead and open those PRs, I glanced through the changes and have a few minor critiques. The plugin library looks amazing though.

Also, I noticed that the plugin uses coracle's namespace in the file path, you might consider changing that.

The latest commits to the 3 packages should meet all of the issue requirements, with the added bonus of extra support for all installed NIP-55 signers, not just Amber. There is still some refactoring work to be done in the capacitor plugin, namely to guard against situations where the event json is ill-formed, but this won't affect Coracle as the @welshman/signer package takes care of this internally.

EDIT: The other addition to the signer plugin which is that it now uses a combination of Intents and the Content Resolver to sign/encrypt/decrypt etc as using Intents only means that the Signer app is brought to the foreground every single time it is called which is terrible UX. The way it works now is that if the User hasn't authorized Coracle it will show the app using Intents otherwise it will just use the Content Resolver in the background without any disruption to the User.

Resolved by #426