upleb.uk

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

summaryrefslogtreecommitdiff
path: root/44.md
diff options
context:
space:
mode:
Diffstat (limited to '44.md')
-rw-r--r--44.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/44.md b/44.md
index 8f840aa..3952b98 100644
--- a/44.md
+++ b/44.md
@@ -75,7 +75,7 @@ export function encrypt(privkey: string, pubkey: string, text: string, v = 1) {
75 return base64.encode(payload) 75 return base64.encode(payload)
76} 76}
77 77
78export function decrypt(privkey: string, pubkey: string, payload: string) { 78export function decrypt(privkey: string, pubkey: string, blob: string) {
79 const payload = base64.decode(blob) 79 const payload = base64.decode(blob)
80 if (payload[0] !== 1) { 80 if (payload[0] !== 1) {
81 throw new Error('NIP44: unknown encryption version') 81 throw new Error('NIP44: unknown encryption version')