upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--55.md (renamed from 100.md)42
-rw-r--r--README.md2
2 files changed, 22 insertions, 22 deletions
diff --git a/100.md b/55.md
index 4a304c3..4565e8c 100644
--- a/100.md
+++ b/55.md
@@ -1,4 +1,4 @@
1# NIP-100 1# NIP-55
2 2
3## Android Signer Application 3## Android Signer Application
4 4
@@ -118,7 +118,7 @@ launcher.launch(intent)
118 intent.putExtra("id", event.id) 118 intent.putExtra("id", event.id)
119 // Send the current logged in user npub 119 // Send the current logged in user npub
120 intent.putExtra("current_user", npub) 120 intent.putExtra("current_user", npub)
121 121
122 context.startActivity(intent) 122 context.startActivity(intent)
123 ``` 123 ```
124 - result: 124 - result:
@@ -144,7 +144,7 @@ launcher.launch(intent)
144 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 144 intent.putExtra("current_user", account.keyPair.pubKey.toNpub())
145 // Send the hex pubKey that will be used for encrypting the data 145 // Send the hex pubKey that will be used for encrypting the data
146 intent.putExtra("pubKey", pubKey) 146 intent.putExtra("pubKey", pubKey)
147 147
148 context.startActivity(intent) 148 context.startActivity(intent)
149 ``` 149 ```
150 - result: 150 - result:
@@ -169,7 +169,7 @@ launcher.launch(intent)
169 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 169 intent.putExtra("current_user", account.keyPair.pubKey.toNpub())
170 // Send the hex pubKey that will be used for encrypting the data 170 // Send the hex pubKey that will be used for encrypting the data
171 intent.putExtra("pubKey", pubKey) 171 intent.putExtra("pubKey", pubKey)
172 172
173 context.startActivity(intent) 173 context.startActivity(intent)
174 ``` 174 ```
175 - result: 175 - result:
@@ -179,7 +179,7 @@ launcher.launch(intent)
179 val encryptedText = intent.data?.getStringExtra("signature") 179 val encryptedText = intent.data?.getStringExtra("signature")
180 // the id you sent 180 // the id you sent
181 val id = intent.data?.getStringExtra("id") 181 val id = intent.data?.getStringExtra("id")
182 ``` 182 ```
183 183
184- **nip04_decrypt** 184- **nip04_decrypt**
185 - params: 185 - params:
@@ -194,7 +194,7 @@ launcher.launch(intent)
194 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 194 intent.putExtra("current_user", account.keyPair.pubKey.toNpub())
195 // Send the hex pubKey that will be used for decrypting the data 195 // Send the hex pubKey that will be used for decrypting the data
196 intent.putExtra("pubKey", pubKey) 196 intent.putExtra("pubKey", pubKey)
197 197
198 context.startActivity(intent) 198 context.startActivity(intent)
199 ``` 199 ```
200 - result: 200 - result:
@@ -204,7 +204,7 @@ launcher.launch(intent)
204 val plainText = intent.data?.getStringExtra("signature") 204 val plainText = intent.data?.getStringExtra("signature")
205 // the id you sent 205 // the id you sent
206 val id = intent.data?.getStringExtra("id") 206 val id = intent.data?.getStringExtra("id")
207 ``` 207 ```
208 208
209- **nip44_decrypt** 209- **nip44_decrypt**
210 - params: 210 - params:
@@ -219,7 +219,7 @@ launcher.launch(intent)
219 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 219 intent.putExtra("current_user", account.keyPair.pubKey.toNpub())
220 // Send the hex pubKey that will be used for decrypting the data 220 // Send the hex pubKey that will be used for decrypting the data
221 intent.putExtra("pubKey", pubKey) 221 intent.putExtra("pubKey", pubKey)
222 222
223 context.startActivity(intent) 223 context.startActivity(intent)
224 ``` 224 ```
225 - result: 225 - result:
@@ -229,7 +229,7 @@ launcher.launch(intent)
229 val plainText = intent.data?.getStringExtra("signature") 229 val plainText = intent.data?.getStringExtra("signature")
230 // the id you sent 230 // the id you sent
231 val id = intent.data?.getStringExtra("id") 231 val id = intent.data?.getStringExtra("id")
232 ``` 232 ```
233 233
234- **decrypt_zap_event** 234- **decrypt_zap_event**
235 - params: 235 - params:
@@ -251,7 +251,7 @@ launcher.launch(intent)
251 val eventJson = intent.data?.getStringExtra("signature") 251 val eventJson = intent.data?.getStringExtra("signature")
252 // the id you sent 252 // the id you sent
253 val id = intent.data?.getStringExtra("id") 253 val id = intent.data?.getStringExtra("id")
254 ``` 254 ```
255 255
256## Using Content Resolver 256## Using Content Resolver
257 257
@@ -364,7 +364,7 @@ If the user chose to always reject the event, signer application will return the
364 val index = it.getColumnIndex("signature") 364 val index = it.getColumnIndex("signature")
365 val encryptedText = it.getString(index) 365 val encryptedText = it.getString(index)
366 } 366 }
367 ``` 367 ```
368 368
369- **nip04_decrypt** 369- **nip04_decrypt**
370 - params: 370 - params:
@@ -388,7 +388,7 @@ If the user chose to always reject the event, signer application will return the
388 val index = it.getColumnIndex("signature") 388 val index = it.getColumnIndex("signature")
389 val encryptedText = it.getString(index) 389 val encryptedText = it.getString(index)
390 } 390 }
391 ``` 391 ```
392 392
393- **nip44_decrypt** 393- **nip44_decrypt**
394 - params: 394 - params:
@@ -412,7 +412,7 @@ If the user chose to always reject the event, signer application will return the
412 val index = it.getColumnIndex("signature") 412 val index = it.getColumnIndex("signature")
413 val encryptedText = it.getString(index) 413 val encryptedText = it.getString(index)
414 } 414 }
415 ``` 415 ```
416 416
417- **decrypt_zap_event** 417- **decrypt_zap_event**
418 - params: 418 - params:
@@ -436,7 +436,7 @@ If the user chose to always reject the event, signer application will return the
436 val index = it.getColumnIndex("signature") 436 val index = it.getColumnIndex("signature")
437 val eventJson = it.getString(index) 437 val eventJson = it.getString(index)
438 } 438 }
439 ``` 439 ```
440 440
441# Usage for Web Applications 441# Usage for Web Applications
442 442
@@ -464,42 +464,42 @@ Android intents and browser urls have limitations, so if you are using the `retu
464 464
465 ```js 465 ```js
466 window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=sign_event&callbackUrl=https://example.com/?event=`; 466 window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=sign_event&callbackUrl=https://example.com/?event=`;
467 ``` 467 ```
468 468
469- **nip04_encrypt** 469- **nip04_encrypt**
470 - params: 470 - params:
471 471
472 ```js 472 ```js
473 window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_encrypt&callbackUrl=https://example.com/?event=`; 473 window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_encrypt&callbackUrl=https://example.com/?event=`;
474 ``` 474 ```
475 475
476- **nip44_encrypt** 476- **nip44_encrypt**
477 - params: 477 - params:
478 478
479 ```js 479 ```js
480 window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_encrypt&callbackUrl=https://example.com/?event=`; 480 window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_encrypt&callbackUrl=https://example.com/?event=`;
481 ``` 481 ```
482 482
483- **nip04_decrypt** 483- **nip04_decrypt**
484 - params: 484 - params:
485 485
486 ```js 486 ```js
487 window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_decrypt&callbackUrl=https://example.com/?event=`; 487 window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_decrypt&callbackUrl=https://example.com/?event=`;
488 ``` 488 ```
489 489
490- **nip44_decrypt** 490- **nip44_decrypt**
491 - params: 491 - params:
492 492
493 ```js 493 ```js
494 window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`; 494 window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`;
495 ``` 495 ```
496 496
497- **decrypt_zap_event** 497- **decrypt_zap_event**
498 - params: 498 - params:
499 499
500 ```js 500 ```js
501 window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=decrypt_zap_event&callbackUrl=https://example.com/?event=`; 501 window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=decrypt_zap_event&callbackUrl=https://example.com/?event=`;
502 ``` 502 ```
503 503
504## Example 504## Example
505 505
@@ -513,7 +513,7 @@ Android intents and browser urls have limitations, so if you are using the `retu
513</head> 513</head>
514<body> 514<body>
515 <h1>Test</h1> 515 <h1>Test</h1>
516 516
517 <script> 517 <script>
518 window.onload = function() { 518 window.onload = function() {
519 var url = new URL(window.location.href); 519 var url = new URL(window.location.href);
diff --git a/README.md b/README.md
index bd78784..de85654 100644
--- a/README.md
+++ b/README.md
@@ -68,6 +68,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
68- [NIP-52: Calendar Events](52.md) 68- [NIP-52: Calendar Events](52.md)
69- [NIP-53: Live Activities](53.md) 69- [NIP-53: Live Activities](53.md)
70- [NIP-54: Wiki](54.md) 70- [NIP-54: Wiki](54.md)
71- [NIP-55: Android Signer Application](100.md)
71- [NIP-56: Reporting](56.md) 72- [NIP-56: Reporting](56.md)
72- [NIP-57: Lightning Zaps](57.md) 73- [NIP-57: Lightning Zaps](57.md)
73- [NIP-58: Badges](58.md) 74- [NIP-58: Badges](58.md)
@@ -85,7 +86,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
85- [NIP-96: HTTP File Storage Integration](96.md) 86- [NIP-96: HTTP File Storage Integration](96.md)
86- [NIP-98: HTTP Auth](98.md) 87- [NIP-98: HTTP Auth](98.md)
87- [NIP-99: Classified Listings](99.md) 88- [NIP-99: Classified Listings](99.md)
88- [NIP-100: Android Signer Application](100.md)
89 89
90## Event Kinds 90## Event Kinds
91| kind | description | NIP | 91| kind | description | NIP |