diff --git a/55.md b/55.md index 19d5ea98..218af354 100644 --- a/55.md +++ b/55.md @@ -107,6 +107,13 @@ Send the Intent: launcher.launch(intent) ``` +### Initiating a connection + +- Client send a get_public_key `Intent` +- Signer responds with the user `pubkey` and it's `packageName` +- Client saves the `pubkey` and `packageName` somewhere and NEVER calls `get_public_key` again +- Client now can send `content resolvers` and `Intents` for the other methods + #### Methods - **get_public_key** @@ -299,33 +306,6 @@ Clients SHOULD save the user pubkey locally and avoid calling the `get_public_ke #### Methods -- **get_public_key** - - params: - - ```kotlin - val result = context.contentResolver.query( - Uri.parse("content://com.example.signer.GET_PUBLIC_KEY"), - listOf(hex_pub_key), - null, - null, - null - ) - ``` - - result: - - Will return the **pubkey** in the result column - - ```kotlin - if (result == null) return - - if (it.getColumnIndex("rejected") > -1) return - - if (result.moveToFirst()) { - val index = it.getColumnIndex("result") - if (index < 0) return - val pubkey = it.getString(index) - } - ``` - - **sign_event** - params: