rename argument.

This commit is contained in:
fiatjaf 2023-08-15 11:53:25 -03:00
parent 2239f96541
commit 8a2977bcc5
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

2
44.md
View File

@ -75,7 +75,7 @@ export function encrypt(privkey: string, pubkey: string, text: string, v = 1) {
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)
if (payload[0] !== 1) {
throw new Error('NIP44: unknown encryption version')