WIP NIP-17 direct messages

This commit is contained in:
tyiu committed 2025-07-11 22:28:47 -04:00
1 parent 3ddb2625e9
commit 922c705dd0
17 files changed
+369 -18

No files matched your search

+13
View File
@@ -40,4 +40,17 @@ final class NostrEventTests: XCTestCase {
let urlInContent2 = "https://cdn.nostr.build/i/5c1d3296f66c2630131bf123106486aeaf051ed8466031c0e0532d70b33cddb2.jpg"
XCTAssert(testEvent2.content.contains(urlInContent2), "Issue parsing event. Expected to see '\(urlInContent2)' inside \(testEvent2.content)")
}
func testNostrEventWithoutPrivateKey() throws {
let event = NostrEvent(
content: "Test",
keypair: .just_pubkey(test_pubkey),
kind: NostrKind.dm.rawValue,
tags: []
)
let nonNilEvent = try XCTUnwrap(event)
let json = try JSONEncoder().encode(nonNilEvent)
print(json)
}
}