nips
nips copied to clipboard
Android Signer Application
Nostr event signer for Android. It allows users to keep their nsec segregated in a single, dedicated app without requiring any extensions or web servers.
I think it would also be better to have a Signer interface spec instead of separated nips like @vitorpamplona suggests in #720
This looks good.
Looks good.
Is there a way to identify all signers installed in the phone?
For instance: Amethyst's login screen would have a "Login with another app" button that creates a URI intent that triggers Android's app chooser. The chosen Signer app receives the request to connect and replies with package name and any other details to assemble follow up calls.
Looks good.
Is there a way to identify all signers installed in the phone?
For instance: Amethyst's login screen would have a "Login with another app" button that creates a URI intent that triggers Android's app chooser. The chosen Signer app receives the request to connect and replies with
package nameand any other details to assemble follow up calls.
A quick test I did you can use this code but you need the QUERY_ALL_PACKAGES permission:
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:"))
for (info in this.packageManager.queryIntentActivities(intent, 0)) {
val packageName = info.activityInfo.packageName
Log.d("Packages", "package = $packageName")
}
I havent found a way to get the package name from the android app chooser
I havent found a way to get the package name from the android app chooser
I think it will need to be manual. It goes to the Signer app and the signer app sends an Intent back. Maybe the GetPublicKey call shouldn't specify the package and the return of that call should include a package in StringExtra. Then the app saves the package name in the external signer.
I am starting to think we should deprecate the Private Zap implementation used by Damus and Amethyst (event kind 9733)
The main issue is that it requires a special decrypt_zap function and a special handling of the sign function here, in the browser extension, and in NIP-46. And it requires it because the private key used in private events is a sha256(privkey + (event_id for posts or pubkey for users) + createdAt.toString())
Since apps with external signers (extension + NIP-46 + this one) cannot access the user's private key, they cannot generate the new key by themselves. The signer application must then have a special method to receive a created_at + event_id or a pubkey to assemble the key and sign it :(
I am also getting some feedback from the #nostrdesign and I think I'll add some permissions to the get public key so the users can approve or reject them when logging. So we can avoid showing a lot of pop ups.
And in the content provider I need to add something to tell the app the user rejected the event kind/type forever
@greenart7c3 can you check if this up-to-date with your implementation?
It is. Should I remove the nip 04 methods from here?
We should merge this. @fiatjaf
Can we get this merged, please? Multiple android clients are using Amber with this API.