nostr_address_book 0.7.0
nostr_address_book: ^0.7.0 copied to clipboard
Local-first Nostr address book backed by vCard 4.0 events.
0.7.0 #
- Breaking: require
sync_engine_shim_for_ndk: ^0.9.1. The engine keeps the dates of its relay list fetches in the sameSembastSyncStore. - Sync reads from the account's NIP-65 write relays, where
upsertanddeletepublish, instead of its read relays: an account with separate read and write relays never got its contacts back. - The sync request reads that list on every pass, so it follows the account
when its relays change. There is no fallback any more, to the connected or
bootstrap relays: an account without a list has published nothing, so its
request reports
synceduntil the list names relays. - Breaking:
sync()andsyncRequest()are synchronous, and return aSyncHandleand aSyncRequest. - Breaking:
getReadRelays()is gone.
0.6.0 #
- Breaking: require
sync_engine_shim_for_ndk: ^0.8.0.SyncEnginetakes astoreinstead of a sembastdb: passSembastSyncStore(database), which reads the coverage 0.7 wrote. - Breaking: require
broadcast_queue_shim_for_ndk: ^0.8.0.RelaySetis nowUrlSet, andBroadcastStatusgainssupersededandcancelled. - Accept
ndkfrom 0.10.0-dev.7 up to 0.11.
0.5.0 #
- Breaking: require
broadcast_queue_shim_for_ndk: ^0.6.0.upsertanddeletequeue events for the account's outbox relays, resolved by the queue instead of before queueing, so they no longer wait on the network. The queue needs arelayListFn, whichOfflineBroadcast.withNdkprovides. - Breaking:
getWriteRelays()is gone.
0.4.0 #
deletepublishes an empty version of the contact event alongside the NIP-09 deletion request, both stamped with the samecreated_at. A relay honouring NIP-09 drops the two and keeps nothing; a relay ignoring it still replaces the contact with the empty version and stops serving the encrypted vCard.- The deletion request no longer carries an
etag. For an addressable kind theatag already covers every version up to the deletion timestamp, while anetag names a single version that may be stale by the time it is written. - Deletions read from relays keep the two tag forms apart, as NIP-09 defines
them: an
etag deletes the one event it names, anatag every version up to its owncreated_at, that timestamp included. A contact and its deletion sharing one second are now resolved as deleted, and deleting a superseded version by id no longer takes the current one down with it. - Breaking: downward sync moves to
sync_engine_shim_for_ndk. The constructor requires a caller-ownedsyncEngine, shareable with the rest of the app like the broadcast queue. The engine works out what is missing, fetches it into the NDK cache, and revisits the recent end on its own, so the app has no pagination, nosincetracking and no polling left to write. - Breaking:
fetchRecent(),pull(),recentFilters(),recentLimitandAddressBookFiltersare gone.sync({pubkey})declares an account's sync and returns its handle,refresh()is the pull to refresh gesture,reconcile()turns cached events into contacts,stopSync/stopAllSyncdrop the package's interest, andsyncRequest({pubkey})exposes what was declared. - Breaking:
AddressBookSyncResult.fetchedEventsis gone; the engine reports pages, not events. The remaining counters cover reconciliation, background passes included. - Breaking:
contactFilteranddeletionFilterloselimitanduid. The engine ignores a filterlimit, and a window is declared throughsince/until. - Sync requests authenticate as their own account (NIP-42), so an address book a relay serves only to its owner syncs like any other.
clearLocalAccountDataandclearAllLocalDataforget the sync coverage of the address book's own filters instead of clearing NDK fetched ranges globally, so other consumers no longer re-download. Coverage goes on every relay a filter was synced from, current NIP-65 list or not: a cache emptied under a coverage that survived is never fetched again.- Breaking: require
ndk: ^0.10.0-dev.1and Dart SDK^3.12.2, whichsync_engine_shim_for_ndk: ^0.7.0pulls in.
0.3.1 #
- Widen the ndk constraint to
>=0.9.2 <0.11.0, so an app already on the ndk0.10prerelease series can depend on this package. Requiresbroadcast_queue_shim_for_ndk: ^0.5.1, which widened its own constraint the same way. No API change.
0.3.0 #
- Breaking: require
ndk: ^0.9.2andbroadcast_queue_shim_for_ndk: ^0.5.0. Both theNdkinstance and the broadcast queue are caller-owned, so the app has to move to ndk0.9as well.
0.2.0 #
- Add
clearLocalAccountData({required String pubkey})andclearAllLocalData(). They clear the raw and computed stores, kind38522and address-book NIP-09 events in the NDK cache, and NDK fetched-range records so later pulls re-download. The caller-owned broadcast queue is never touched: clear it through its ownclearLocalAccountData/clearAllLocalDataat logout. - Support several accounts in one database: computed stores are keyed by
pubkey:uid, NIP-09 deletions only apply to contacts of their own author, andContactQuery.pubkeyfilterslist/watchAll. - Breaking: the constructor now requires a caller-owned
broadcastQueue(OfflineBroadcast), shareable with the rest of the app.dispose()is removed: dispose the queue yourself. Depend onbroadcast_queue_shim_for_ndkdirectly to construct the queue. - Breaking:
getandwatchtarget the current account by default and take an optionalpubkey. CallrebuildComputedStores()once after upgrading so computed stores are re-keyed. - Store the owning account in raw decrypted entries. Pre-0.2.0 entries are rewritten with their author during rebuild while their encrypted event is still cached.
- Attribute queued broadcasts to the signing account, so account-scoped queue
clears work and
broadcastQueue.get/watchlookups take thepubkeyargument. - Bump
broadcast_queue_shim_for_ndkto^0.4.0.
0.1.1 #
- Ensure address-book upsert and delete events are signed before they are saved or queued for offline broadcast.
- Rename relay accessor methods to
getReadRelaysandgetWriteRelays. - Bump
ndkto^0.8.4-dev.5.
0.1.0 #
- Initial version.