Private Zaps

This adds private zaps, which have messages and authors encrypted to
the target. Keys are deterministically generated so that both the
receiver and sender can decrypt.

Changelog-Added: Private Zaps
This commit is contained in:
William Casarin
2023-03-01 07:43:44 -08:00
parent c72c0079cc
commit 77f5268336
18 changed files with 359 additions and 92 deletions

View File

@@ -21,7 +21,13 @@ class ZapGroup {
}
func zap_requests() -> [NostrEvent] {
zaps.map { z in z.request.ev }
zaps.map { z in
if let priv = z.private_request {
return priv
} else {
return z.request.ev
}
}
}
init(zaps: [Zap]) {