mirror of
https://github.com/edufeed-org/nips.git
synced 2025-12-10 16:54:35 +00:00
add permissions
This commit is contained in:
parent
86e44b75eb
commit
70a722b5d6
1 changed files with 11 additions and 0 deletions
11
100.md
11
100.md
|
|
@ -43,6 +43,17 @@ intent.`package` = "com.example.signer"
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:"))
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:"))
|
||||||
intent.`package` = "com.example.signer"
|
intent.`package` = "com.example.signer"
|
||||||
intent.putExtra("type", "get_public_key")
|
intent.putExtra("type", "get_public_key")
|
||||||
|
// You can send some default permissions for the user authorize for ever
|
||||||
|
val permissions = listOf(
|
||||||
|
Permission(
|
||||||
|
"sign_event",
|
||||||
|
22242
|
||||||
|
),
|
||||||
|
Permission(
|
||||||
|
"nip44_decrypt"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
intent.putExtra("permissions", permissions.toJson())
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
```
|
```
|
||||||
- result:
|
- result:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue