Fix missing info when sending multiple requests to the signer and a missing option when the user reject an event forever

This commit is contained in:
greenart7c3 2024-07-17 08:08:22 -03:00
parent 8c47577ecb
commit f9cafd2a38
No known key found for this signature in database
GPG Key ID: 885822EED3A26A6D

22
55.md
View File

@ -70,6 +70,12 @@ Set the Signer package name:
intent.`package` = "com.example.signer"
```
If you are sending multiple intents without awaiting you can add some intent flags to sign all events without opening multiple times the signer
```kotlin
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP)
```
Send the Intent:
```kotlin
@ -263,7 +269,7 @@ For the SIGN_EVENT type Signer Application returns two columns "signature" and "
For the other types Signer Application returns the column "signature"
If the user chose to always reject the event, signer application will return the column "rejected" and you should not open signer application
If the user chose to always reject the event, signer application will return the column "rejected" when you send "1" as the third parameter in `contentResolver.query` and you should not open signer application
### Methods
@ -274,7 +280,7 @@ If the user chose to always reject the event, signer application will return the
val result = context.contentResolver.query(
Uri.parse("content://com.example.signer.GET_PUBLIC_KEY"),
listOf("login"),
null,
"1",
null,
null
)
@ -299,7 +305,7 @@ If the user chose to always reject the event, signer application will return the
val result = context.contentResolver.query(
Uri.parse("content://com.example.signer.SIGN_EVENT"),
listOf("$eventJson", "", "${logged_in_user_npub}"),
null,
"1",
null,
null
)
@ -325,7 +331,7 @@ If the user chose to always reject the event, signer application will return the
val result = context.contentResolver.query(
Uri.parse("content://com.example.signer.NIP04_ENCRYPT"),
listOf("$plainText", "${hex_pub_key}", "${logged_in_user_npub}"),
null,
"1",
null,
null
)
@ -349,7 +355,7 @@ If the user chose to always reject the event, signer application will return the
val result = context.contentResolver.query(
Uri.parse("content://com.example.signer.NIP44_ENCRYPT"),
listOf("$plainText", "${hex_pub_key}", "${logged_in_user_npub}"),
null,
"1",
null,
null
)
@ -373,7 +379,7 @@ If the user chose to always reject the event, signer application will return the
val result = context.contentResolver.query(
Uri.parse("content://com.example.signer.NIP04_DECRYPT"),
listOf("$encryptedText", "${hex_pub_key}", "${logged_in_user_npub}"),
null,
"1",
null,
null
)
@ -397,7 +403,7 @@ If the user chose to always reject the event, signer application will return the
val result = context.contentResolver.query(
Uri.parse("content://com.example.signer.NIP44_DECRYPT"),
listOf("$encryptedText", "${hex_pub_key}", "${logged_in_user_npub}"),
null,
"1",
null,
null
)
@ -421,7 +427,7 @@ If the user chose to always reject the event, signer application will return the
val result = context.contentResolver.query(
Uri.parse("content://com.example.signer.DECRYPT_ZAP_EVENT"),
listOf("$eventJson", "", "${logged_in_user_npub}"),
null,
"1",
null,
null
)