diff --git a/Sources/NostrSDK/EventCreating.swift b/Sources/NostrSDK/EventCreating.swift index d3ba1f3..bf4bdf6 100644 --- a/Sources/NostrSDK/EventCreating.swift +++ b/Sources/NostrSDK/EventCreating.swift @@ -14,11 +14,11 @@ enum EventCreatingError: Error { public protocol EventCreating: DirectMessageEncrypting {} public extension EventCreating { - /// Creates a set metadata event (kind 0) and signs it with the provided ``Keypair``. + /// Creates a ``SetMetadataEvent`` (kind 0) and signs it with the provided ``Keypair``. /// - Parameters: /// - userMetadata: The metadata to set. /// - keypair: The Keypair to sign with. - /// - Returns: The signed set metadata event. + /// - Returns: The signed ``SetMetadataEvent``. /// /// See [NIP-01 - Basic Event Kinds](https://github.com/nostr-protocol/nips/blob/master/01.md#basic-event-kinds) func setMetadataEvent(withUserMetadata userMetadata: UserMetadata, signedBy keypair: Keypair) throws -> SetMetadataEvent { @@ -29,12 +29,12 @@ public extension EventCreating { return try SetMetadataEvent(kind: .setMetadata, content: metadataAsString, signedBy: keypair) } - /// Creates a direct message event (kind 4) and signs it with the provided ``Keypair``. + /// Creates a ``DirectMessageEvent`` (kind 4) and signs it with the provided ``Keypair``. /// - Parameters: /// - content: The content of the text note. /// - toRecipient: The PublicKey of the recipient. /// - keypair: The Keypair to sign with. - /// - Returns: The signed direct message event. + /// - Returns: The signed ``DirectMessageEvent``. /// /// See [NIP-04 - Direct Message](https://github.com/nostr-protocol/nips/blob/master/04.md) func directMessage(withContent content: String, toRecipient pubkey: PublicKey, signedBy keypair: Keypair) throws -> DirectMessageEvent { @@ -46,22 +46,22 @@ public extension EventCreating { return try DirectMessageEvent(kind: .directMessage, content: encryptedMessage, tags: [recipientTag], signedBy: keypair) } - /// Creates a text note event (kind 1) and signs it with the provided ``Keypair``. + /// Creates a ``TextNoteEvent`` (kind 1) and signs it with the provided ``Keypair``. /// - Parameters: /// - content: The content of the text note. /// - keypair: The Keypair to sign with. - /// - Returns: The signed text note event. + /// - Returns: The signed ``TextNoteEvent``. /// /// See [NIP-01 - Basic Event Kinds](https://github.com/nostr-protocol/nips/blob/master/01.md#basic-event-kinds) func textNote(withContent content: String, signedBy keypair: Keypair) throws -> TextNoteEvent { try TextNoteEvent(kind: .textNote, content: content, signedBy: keypair) } - /// Creates a recommend server event (kind 2) and signs it with the provided ``Keypair``. + /// Creates a ``RecommendServerEvent`` (kind 2) and signs it with the provided ``Keypair``. /// - Parameters: /// - relayURL: The URL of the relay, which must be a websocket URL. /// - keypair: The Keypair to sign with. - /// - Returns: The signed recommend server event. + /// - Returns: The signed ``RecommendServerEvent``. /// /// See [NIP-01 - Basic Event Kinds](https://github.com/nostr-protocol/nips/blob/master/01.md#basic-event-kinds) func recommendServerEvent(withRelayURL relayURL: URL, signedBy keypair: Keypair) throws -> RecommendServerEvent { @@ -72,12 +72,12 @@ public extension EventCreating { return try RecommendServerEvent(kind: .recommendServer, content: relayURL.absoluteString, signedBy: keypair) } - /// Creates a reaction event (kind 7) in response to a different ``NostrEvent`` and signs it with the provided ``Keypair``. + /// Creates a ``ReactionEvent`` (kind 7) in response to a different ``NostrEvent`` and signs it with the provided ``Keypair``. /// - Parameters: /// - content: The content of the reaction. /// - reactedEvent: The NostrEvent being reacted to. /// - keypair: The Keypair to sign with. - /// - Returns: The signed reaction event. + /// - Returns: The signed ``ReactionEvent``. /// /// See [NIP-25 - Reactions](https://github.com/nostr-protocol/nips/blob/master/25.md) func reaction(withContent content: String, reactedEvent: NostrEvent, signedBy keypair: Keypair) throws -> ReactionEvent {