mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
; -> &
This commit is contained in:
parent
6ee0648f00
commit
ff24a56355
16
100.md
16
100.md
|
@ -456,49 +456,49 @@ Android intents and browser urls have limitations, so if you are using the `retu
|
||||||
- params:
|
- params:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.href = `nostrsigner:?compressionType=none;returnType=signature;type=get_public_key;callbackUrl=https://example.com/?event=`;
|
window.href = `nostrsigner:?compressionType=none&returnType=signature&type=get_public_key&callbackUrl=https://example.com/?event=`;
|
||||||
```
|
```
|
||||||
|
|
||||||
- **sign_event**
|
- **sign_event**
|
||||||
- params:
|
- params:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.href = `nostrsigner:${eventJson}?compressionType=none;returnType=signature;type=sign_event;callbackUrl=https://example.com/?event=`;
|
window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=sign_event&callbackUrl=https://example.com/?event=`;
|
||||||
```
|
```
|
||||||
|
|
||||||
- **nip04_encrypt**
|
- **nip04_encrypt**
|
||||||
- params:
|
- params:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key};compressionType=none;returnType=signature;type=nip04_encrypt;callbackUrl=https://example.com/?event=`;
|
window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_encrypt&callbackUrl=https://example.com/?event=`;
|
||||||
```
|
```
|
||||||
|
|
||||||
- **nip44_encrypt**
|
- **nip44_encrypt**
|
||||||
- params:
|
- params:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key};compressionType=none;returnType=signature;type=nip44_encrypt;callbackUrl=https://example.com/?event=`;
|
window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_encrypt&callbackUrl=https://example.com/?event=`;
|
||||||
```
|
```
|
||||||
|
|
||||||
- **nip04_decrypt**
|
- **nip04_decrypt**
|
||||||
- params:
|
- params:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key};compressionType=none;returnType=signature;type=nip04_decrypt;callbackUrl=https://example.com/?event=`;
|
window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_decrypt&callbackUrl=https://example.com/?event=`;
|
||||||
```
|
```
|
||||||
|
|
||||||
- **nip44_decrypt**
|
- **nip44_decrypt**
|
||||||
- params:
|
- params:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key};compressionType=none;returnType=signature;type=nip44_decrypt;callbackUrl=https://example.com/?event=`;
|
window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`;
|
||||||
```
|
```
|
||||||
|
|
||||||
- **decrypt_zap_event**
|
- **decrypt_zap_event**
|
||||||
- params:
|
- params:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.href = `nostrsigner:${eventJson}?compressionType=none;returnType=signature;type=decrypt_zap_event;callbackUrl=https://example.com/?event=`;
|
window.href = `nostrsigner:${eventJson}?compressionType=none&returnType=signature&type=decrypt_zap_event&callbackUrl=https://example.com/?event=`;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -528,7 +528,7 @@ Android intents and browser urls have limitations, so if you are using the `retu
|
||||||
}
|
}
|
||||||
let encodedJson = encodeURIComponent(JSON.stringify(json))
|
let encodedJson = encodeURIComponent(JSON.stringify(json))
|
||||||
var newAnchor = document.createElement("a");
|
var newAnchor = document.createElement("a");
|
||||||
newAnchor.href = `nostrsigner:${encodedJson}?compressionType=none;returnType=signature;type=sign_event;callbackUrl=https://example.com/?event=`;
|
newAnchor.href = `nostrsigner:${encodedJson}?compressionType=none&returnType=signature&type=sign_event&callbackUrl=https://example.com/?event=`;
|
||||||
newAnchor.textContent = "Open External Signer";
|
newAnchor.textContent = "Open External Signer";
|
||||||
document.body.appendChild(newAnchor)
|
document.body.appendChild(newAnchor)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user