Skip to content

Commit

Permalink
[ Add ] exposed the tlc module
Browse files Browse the repository at this point in the history
  • Loading branch information
anasfik committed Aug 9, 2023
1 parent 03e3024 commit 46ff665
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/nostr/dart_nostr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:dart_nostr/nostr/instance/relays/relays.dart';
import 'base/nostr.dart';
import 'core/utils.dart';
import 'instance/keys/keys.dart';
import 'instance/tlv/tlv_utils.dart';
import 'instance/utils/utils.dart';

/// {@template nostr_service}
Expand Down Expand Up @@ -39,4 +40,7 @@ class Nostr implements NostrServiceBase {

/// {@macro nostr_utils}
final utilsService = NostrUtils();

/// {@macro nostr_tlv}
final tlv = NostrTLV();
}
2 changes: 2 additions & 0 deletions lib/nostr/instance/relays/relays.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ class NostrRelays implements NostrRelaysBase {
/// This is the controller which will receive all notices from all relays.
final _noticeStreamController = StreamController<NostrNotice>.broadcast();

/// Represents a registry of all relays that you did registered with the [init] method.
@override
Map<String, WebSocket> get relaysWebSocketsRegistry =>
NostrRegistry.relaysWebSocketsRegistry;

/// Represents a registry of all events you received from all relays so far.
@override
Map<NostrEventKey, NostrEvent> get eventsRegistry =>
NostrRegistry.eventsRegistry;
Expand Down
3 changes: 3 additions & 0 deletions lib/nostr/instance/tlv/tlv_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import 'package:dart_nostr/nostr/model/tlv.dart';

import 'base/base.dart';

/// {@template nostr_tlv}
/// This class is responsible for handling the tlv.
/// {@endtemplate}
class NostrTLV implements TLVBase {
/// Decode list bytes to list tlv model
@override
Expand Down

0 comments on commit 46ff665

Please sign in to comment.