fix broken nip number.

This commit is contained in:
fiatjaf 2024-06-05 15:24:43 -03:00
parent 23d605140b
commit a6dfc7b5e5
2 changed files with 22 additions and 22 deletions

View File

@ -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
</head>
<body>
<h1>Test</h1>
<script>
window.onload = function() {
var url = new URL(window.location.href);

View File

@ -68,6 +68,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-52: Calendar Events](52.md)
- [NIP-53: Live Activities](53.md)
- [NIP-54: Wiki](54.md)
- [NIP-55: Android Signer Application](100.md)
- [NIP-56: Reporting](56.md)
- [NIP-57: Lightning Zaps](57.md)
- [NIP-58: Badges](58.md)
@ -85,7 +86,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-96: HTTP File Storage Integration](96.md)
- [NIP-98: HTTP Auth](98.md)
- [NIP-99: Classified Listings](99.md)
- [NIP-100: Android Signer Application](100.md)
## Event Kinds
| kind | description | NIP |