diff --git a/lib/src/event.dart b/lib/src/event.dart index a126a07..4d3d3b4 100644 --- a/lib/src/event.dart +++ b/lib/src/event.dart @@ -27,7 +27,7 @@ class Event { /// unix timestamp in seconds late int createdAt; - /// - 0: set_metadata: the content is set to a stringified JSON object {name: , about: , picture: } describing the user who created the event. A relay may delete past set_metadata events once it gets a new one for the same pubkey. + /// - 0: set_metadata: the content is set to a stringified JSON object {name: username, about: string, picture: url} describing the user who created the event. A relay may delete past set_metadata events once it gets a new one for the same pubkey. /// - 1: text_note: the content is set to the text content of a note (anything the user wants to say). Non-plaintext notes should instead use kind 1000-10000 as described in NIP-16. /// - 2: recommend_server: the content is set to the URL (e.g., wss://somerelay.com) of a relay the event creator wants to recommend to its followers. late int kind; @@ -275,11 +275,11 @@ class Event { /// ///[ /// 0, - /// , - /// , - /// , - /// , - /// + /// `pubkey`, as a (lowercase) hex string, + /// `created_at`, as a number, + /// `kind`, as a number, + /// `tags`, as an array of arrays of non-null strings, + /// `content`, as a strin> ///] String getEventId() { // Included for minimum breaking changes diff --git a/lib/src/nips/nip_004.dart b/lib/src/nips/nip_004.dart index e0f777a..68d74fc 100644 --- a/lib/src/nips/nip_004.dart +++ b/lib/src/nips/nip_004.dart @@ -7,7 +7,7 @@ import 'package:nostr/src/utils.dart'; /// /// content MUST be equal to the base64-encoded, aes-256-cbc encrypted string of anything a user wants to write, encrypted using a shared nip4cipher generated by combining the recipient's public-key with the sender's private-key; /// this appended by the base64-encoded initialization vector as if it was a querystring parameter named "iv". -/// The format is the following: "content": "?iv=". +/// The format is the following: "content": "`encrypted_text`?iv=`initialization_vector`". /// /// tags MUST contain an entry identifying the receiver of the message (such that relays may naturally forward this event to them), in the form ["p", "pubkey, as a hex string"]. /// diff --git a/lib/src/nips/nip_010.dart b/lib/src/nips/nip_010.dart index f712f0c..714b031 100644 --- a/lib/src/nips/nip_010.dart +++ b/lib/src/nips/nip_010.dart @@ -1,7 +1,6 @@ -///This NIP describes how to use "e" and "p" tags in text events, -///especially those that are replies to other text events. -///It helps clients thread the replies into a tree rooted at the original event. - +/// This NIP describes how to use "e" and "p" tags in text events, +/// especially those that are replies to other text events. +/// It helps clients thread the replies into a tree rooted at the original event. class Nip10 { ///{ /// "tags": [ diff --git a/pubspec.yaml b/pubspec.yaml index ae66b6f..f9f5cde 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.18.5 <4.0.0' dev_dependencies: - lints: ^2.0.0 + lints: ^5.1.1 test: ^1.16.0 dependencies: bip340: ^0.2.0