mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
rename argument.
This commit is contained in:
parent
2239f96541
commit
8a2977bcc5
2
44.md
2
44.md
|
@ -75,7 +75,7 @@ export function encrypt(privkey: string, pubkey: string, text: string, v = 1) {
|
||||||
return base64.encode(payload)
|
return base64.encode(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function decrypt(privkey: string, pubkey: string, payload: string) {
|
export function decrypt(privkey: string, pubkey: string, blob: string) {
|
||||||
const payload = base64.decode(blob)
|
const payload = base64.decode(blob)
|
||||||
if (payload[0] !== 1) {
|
if (payload[0] !== 1) {
|
||||||
throw new Error('NIP44: unknown encryption version')
|
throw new Error('NIP44: unknown encryption version')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user