diff options
| author | greenart7c3 <115044884+greenart7c3@users.noreply.github.com> | 2025-02-13 23:46:56 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-13 18:46:56 -0800 |
| commit | 81908b6e3fbc852181de9ed21cf244f525ff60af (patch) | |
| tree | 61891552885cd3a2777c4b6e51142d292d76efc5 /55.md | |
| parent | 6e7a618e7f873bb91e743caacc3b09edab7796a0 (diff) | |
remove get_relays from signers (#1779)
Diffstat (limited to '55.md')
| -rw-r--r-- | 55.md | 56 |
1 files changed, 0 insertions, 56 deletions
| @@ -262,29 +262,6 @@ launcher.launch(intent) | |||
| 262 | val id = intent.data?.getStringExtra("id") | 262 | val id = intent.data?.getStringExtra("id") |
| 263 | ``` | 263 | ``` |
| 264 | 264 | ||
| 265 | - **get_relays** | ||
| 266 | - params: | ||
| 267 | |||
| 268 | ```kotlin | ||
| 269 | val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:")) | ||
| 270 | intent.`package` = "com.example.signer" | ||
| 271 | intent.putExtra("type", "get_relays") | ||
| 272 | // to control the result in your application in case you are not waiting the result before sending another intent | ||
| 273 | intent.putExtra("id", "some_id") | ||
| 274 | // Send the current logged in user pubkey | ||
| 275 | intent.putExtra("current_user", account.keyPair.pubkey) | ||
| 276 | |||
| 277 | context.startActivity(intent) | ||
| 278 | ``` | ||
| 279 | - result: | ||
| 280 | - If the user approved intent it will return the **result** and **id** fields | ||
| 281 | |||
| 282 | ```kotlin | ||
| 283 | val relayJsonText = intent.data?.getStringExtra("result") | ||
| 284 | // the id you sent | ||
| 285 | val id = intent.data?.getStringExtra("id") | ||
| 286 | ``` | ||
| 287 | |||
| 288 | - **decrypt_zap_event** | 265 | - **decrypt_zap_event** |
| 289 | - params: | 266 | - params: |
| 290 | 267 | ||
| @@ -480,32 +457,6 @@ If the user chose to always reject the event, signer application will return the | |||
| 480 | } | 457 | } |
| 481 | ``` | 458 | ``` |
| 482 | 459 | ||
| 483 | - **get_relays** | ||
| 484 | - params: | ||
| 485 | |||
| 486 | ```kotlin | ||
| 487 | val result = context.contentResolver.query( | ||
| 488 | Uri.parse("content://com.example.signer.GET_RELAYS"), | ||
| 489 | listOf("${logged_in_user_pubkey}"), | ||
| 490 | null, | ||
| 491 | null, | ||
| 492 | null | ||
| 493 | ) | ||
| 494 | ``` | ||
| 495 | - result: | ||
| 496 | - Will return the **result** column | ||
| 497 | |||
| 498 | ```kotlin | ||
| 499 | if (result == null) return | ||
| 500 | |||
| 501 | if (it.getColumnIndex("rejected") > -1) return | ||
| 502 | |||
| 503 | if (result.moveToFirst()) { | ||
| 504 | val index = it.getColumnIndex("result") | ||
| 505 | val relayJsonText = it.getString(index) | ||
| 506 | } | ||
| 507 | ``` | ||
| 508 | |||
| 509 | - **decrypt_zap_event** | 460 | - **decrypt_zap_event** |
| 510 | - params: | 461 | - params: |
| 511 | 462 | ||
| @@ -588,13 +539,6 @@ Android intents and browser urls have limitations, so if you are using the `retu | |||
| 588 | window.href = `nostrsigner:${encryptedText}?pubkey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`; | 539 | window.href = `nostrsigner:${encryptedText}?pubkey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`; |
| 589 | ``` | 540 | ``` |
| 590 | 541 | ||
| 591 | - **get_relays** | ||
| 592 | - params: | ||
| 593 | |||
| 594 | ```js | ||
| 595 | window.href = `nostrsigner:?compressionType=none&returnType=signature&type=get_relays&callbackUrl=https://example.com/?event=`; | ||
| 596 | ``` | ||
| 597 | |||
| 598 | - **decrypt_zap_event** | 542 | - **decrypt_zap_event** |
| 599 | - params: | 543 | - params: |
| 600 | 544 | ||