Skip to content

UlrichRaab/nostr_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nostr_client 0.2.0

A nostr client for dart and flutter.

Features

Getting Started

Add this package to the pubspec.yaml of your flutter project:

dependencies:
  nostr_client: ^0.2.0

Usage

import 'package:nostr_client/nostr_client.dart'

// Create a new relay instance and connect to the relay
final relay = Relay('wss://relay.nostr.info');
relay.connect();

// Print events sent by the relay
relay.stream.whereIsEvent().listen(print);

// Request text events from the relay and subscribe to updates
final filter = Filter(
  kinds: [EventKind.text],
  limit: 10,
);
final subscriptionId = relay.subscribe(filter);

// Cancel the subscription
relay.unsubscribe(subscriptionId);

// Disconnect from the relay
relay.disconnect();

Links

About

A nostr client

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages