nostr_signaling 0.4.0
nostr_signaling: ^0.4.0 copied to clipboard
Nostr-based signaling library for Dart enabling arbitrary data exchange between peers with optional GZip compression and multi-relay redundancy.
0.4.0 #
NostrConfig.load()/loadSync()now return non-nullableNostrConfigand auto-create the config file with a freshly generated key pair if it doesn't exist — no more null checks needed.NostrSignalingFactorysimplified from 6 methods to 2:create()now acceptsrelayUrls(list) anduseCompressiondirectly.- Removed
createWithMultipleRelays,createWithGzipCompression,createWithGzipCompressionAndMultipleRelays— usecreate(relayUrls: [...], useCompression: true)instead. createWithCustomRelays()unchanged for pre-built relay instances.
- Initial point files merged: both Singleton DI and Registry variants live in
a single
initial_point.dartwith shared creation logic — less duplication. initialPointNostrSignalingFromConfig()andinitialPointNostrSignalingRegistryFromConfig()no longer throw when the config file is missing (it's auto-created with a new key pair).
0.3.0 #
EventCallbackis now a class (not a typedef) with built-in deduplication viawork_db— the same event hash is never processed twice.PayloadHashLengthenum — choose between 32-bit, 64-bit, or full 256-bit payload hash to balance collision risk vs. overhead.- Various test improvements and refactoring.
0.2.0 #
NostrConfig— config file persistence withload()/loadSync()/save().initialPointNostrSignalingFromConfig()— singleton initial point that reads key pair and relays from a JSON config file (no required parameters).initialPointNostrSignalingRegistryFromConfig()— registry variant for multiple named instances from config files.initialPointNostrSignalingDefault()andinitialPointNostrSignalingRegistryDefault()now try loading an existing config file before falling back to defaults.
0.1.0 #
- Initial release.
INostrSignalingabstract interface for Nostr-based peer signaling.NostrSignalingImplconcrete implementation with single/multi-relay support.NostrRelayImplconcrete WebSocket relay implementation viadart_nostr.GzipCompressionEnginewith automatic compressed-data detection.NostrSignalingFactoryconvenience factory with pre-configured factory methods.NostrKeys/NostrKeyPairkey generation, import, and validation utilities.NostrTestKeys/NostrTestRelaysconstants for testing and development.- Base64 content encoding for safe transport over Nostr.
- Concurrent publish/subscribe across multiple relays.