upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/55.md
diff options
context:
space:
mode:
Diffstat (limited to '55.md')
-rw-r--r--55.md34
1 files changed, 7 insertions, 27 deletions
diff --git a/55.md b/55.md
index 19d5ea9..218af35 100644
--- a/55.md
+++ b/55.md
@@ -107,6 +107,13 @@ Send the Intent:
107launcher.launch(intent) 107launcher.launch(intent)
108``` 108```
109 109
110### Initiating a connection
111
112- Client send a get_public_key `Intent`
113- Signer responds with the user `pubkey` and it's `packageName`
114- Client saves the `pubkey` and `packageName` somewhere and NEVER calls `get_public_key` again
115- Client now can send `content resolvers` and `Intents` for the other methods
116
110#### Methods 117#### Methods
111 118
112- **get_public_key** 119- **get_public_key**
@@ -299,33 +306,6 @@ Clients SHOULD save the user pubkey locally and avoid calling the `get_public_ke
299 306
300#### Methods 307#### Methods
301 308
302- **get_public_key**
303 - params:
304
305 ```kotlin
306 val result = context.contentResolver.query(
307 Uri.parse("content://com.example.signer.GET_PUBLIC_KEY"),
308 listOf(hex_pub_key),
309 null,
310 null,
311 null
312 )
313 ```
314 - result:
315 - Will return the **pubkey** in the result column
316
317 ```kotlin
318 if (result == null) return
319
320 if (it.getColumnIndex("rejected") > -1) return
321
322 if (result.moveToFirst()) {
323 val index = it.getColumnIndex("result")
324 if (index < 0) return
325 val pubkey = it.getString(index)
326 }
327 ```
328
329- **sign_event** 309- **sign_event**
330 - params: 310 - params:
331 311