Skip to content

Commit

Permalink
refactor: upgrade lints and fix infos warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ethicnology committed Jan 18, 2025
1 parent 78add74 commit 04d63c6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
12 changes: 6 additions & 6 deletions lib/src/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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: <username>, about: <string>, picture: <url, string>} 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;
Expand Down Expand Up @@ -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 string>
/// `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
Expand Down
2 changes: 1 addition & 1 deletion lib/src/nips/nip_004.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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": "<encrypted_text>?iv=<initialization_vector>".
/// 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"].
///
Expand Down
7 changes: 3 additions & 4 deletions lib/src/nips/nip_010.dart
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04d63c6

Please sign in to comment.