nip77 1.0.1
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();
}