WIP NIP-17 direct messages

This commit is contained in:
2025-06-09 20:31:00 -05:00
parent 3ddb2625e9
commit 922c705dd0
17 changed files with 369 additions and 18 deletions

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)
}
}