nip77 1.0.1 copy "nip77: ^1.0.1" to clipboard
nip77: ^1.0.1 copied to clipboard

Dart implementation of NIP-77 Negentropy Syncing. Get the Nostr events that relay has and you don't and vis-versa.

example/nip77_example.dart

import 'package:nip77/nip77.dart';

void main() async {
  final client = Nip77Client(relayUrl: "wss://nostr-01.uid.ovh");

  await client.connect();

  final filter = {
    'kinds': [0],
  };

  Map<String, int> myEvents = {};

  final syncResult = await client.syncEvents(
    myEvents: myEvents,
    filter: filter,
  );

  print("Events ids that we need ${syncResult.needIds}");
  print("Events ids that we have and relay don't ${syncResult.haveIds}");

  await client.disconnect();
}
0
likes
160
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

Dart implementation of NIP-77 Negentropy Syncing. Get the Nostr events that relay has and you don't and vis-versa.

Repository

Topics

#nostr #nip77 #synchronization

Documentation

API reference

License

MIT (license)

Dependencies

convert, crypto, web_socket_channel

More

Packages that depend on nip77