From a6dfc7b5e513ea3070abcded3608b28e4d4a1512 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 5 Jun 2024 15:24:43 -0300 Subject: [PATCH] fix broken nip number. --- 100.md => 55.md | 42 +++++++++++++++++++++--------------------- README.md | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) rename 100.md => 55.md (98%) diff --git a/100.md b/55.md similarity index 98% rename from 100.md rename to 55.md index 4a304c3a..4565e8c3 100644 --- a/100.md +++ b/55.md @@ -1,4 +1,4 @@ -# NIP-100 +# NIP-55 ## Android Signer Application @@ -118,7 +118,7 @@ launcher.launch(intent) intent.putExtra("id", event.id) // Send the current logged in user npub intent.putExtra("current_user", npub) - + context.startActivity(intent) ``` - result: @@ -144,7 +144,7 @@ launcher.launch(intent) intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) // Send the hex pubKey that will be used for encrypting the data intent.putExtra("pubKey", pubKey) - + context.startActivity(intent) ``` - result: @@ -169,7 +169,7 @@ launcher.launch(intent) intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) // Send the hex pubKey that will be used for encrypting the data intent.putExtra("pubKey", pubKey) - + context.startActivity(intent) ``` - result: @@ -179,7 +179,7 @@ launcher.launch(intent) val encryptedText = intent.data?.getStringExtra("signature") // the id you sent val id = intent.data?.getStringExtra("id") - ``` + ``` - **nip04_decrypt** - params: @@ -194,7 +194,7 @@ launcher.launch(intent) intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) // Send the hex pubKey that will be used for decrypting the data intent.putExtra("pubKey", pubKey) - + context.startActivity(intent) ``` - result: @@ -204,7 +204,7 @@ launcher.launch(intent) val plainText = intent.data?.getStringExtra("signature") // the id you sent val id = intent.data?.getStringExtra("id") - ``` + ``` - **nip44_decrypt** - params: @@ -219,7 +219,7 @@ launcher.launch(intent) intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) // Send the hex pubKey that will be used for decrypting the data intent.putExtra("pubKey", pubKey) - + context.startActivity(intent) ``` - result: @@ -229,7 +229,7 @@ launcher.launch(intent) val plainText = intent.data?.getStringExtra("signature") // the id you sent val id = intent.data?.getStringExtra("id") - ``` + ``` - **decrypt_zap_event** - params: @@ -251,7 +251,7 @@ launcher.launch(intent) val eventJson = intent.data?.getStringExtra("signature") // the id you sent val id = intent.data?.getStringExtra("id") - ``` + ``` ## Using Content Resolver @@ -364,7 +364,7 @@ If the user chose to always reject the event, signer application will return the val index = it.getColumnIndex("signature") val encryptedText = it.getString(index) } - ``` + ``` - **nip04_decrypt** - params: @@ -388,7 +388,7 @@ If the user chose to always reject the event, signer application will return the val index = it.getColumnIndex("signature") val encryptedText = it.getString(index) } - ``` + ``` - **nip44_decrypt** - params: @@ -412,7 +412,7 @@ If the user chose to always reject the event, signer application will return the val index = it.getColumnIndex("signature") val encryptedText = it.getString(index) } - ``` + ``` - **decrypt_zap_event** - params: @@ -436,7 +436,7 @@ If the user chose to always reject the event, signer application will return the val index = it.getColumnIndex("signature") val eventJson = it.getString(index) } - ``` + ``` # Usage for Web Applications @@ -464,42 +464,42 @@ Android intents and browser urls have limitations, so if you are using the `retu ```js window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=sign_event&callbackUrl=https://example.com/?event=`; - ``` + ``` - **nip04_encrypt** - params: ```js window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_encrypt&callbackUrl=https://example.com/?event=`; - ``` + ``` - **nip44_encrypt** - params: ```js window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_encrypt&callbackUrl=https://example.com/?event=`; - ``` + ``` - **nip04_decrypt** - params: ```js window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_decrypt&callbackUrl=https://example.com/?event=`; - ``` + ``` - **nip44_decrypt** - params: ```js window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`; - ``` + ``` - **decrypt_zap_event** - params: ```js window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=decrypt_zap_event&callbackUrl=https://example.com/?event=`; - ``` + ``` ## Example @@ -513,7 +513,7 @@ Android intents and browser urls have limitations, so if you are using the `retu

Test

- +