tane/packages/commons_core/test/social
vjrj 182c334883 feat(sync): encrypted device-to-device sync transport (core foundation)
The most foundational Block-2+ gap: the data model was built CRDT-ready
(HLC, tombstones, LWW, append-only Movement) and the import reconciler
proves the merge — but nothing replicated a device's inventory to your
OTHER devices. Only manual file backup/restore moved data between devices.

This lands the transport foundation in commons_core (seed-agnostic, on the
shared connection — the 'one connection, N interfaces' shape):

- SyncTransport: moves an opaque, encrypted snapshot blob between ONE
  identity's own devices. The core carries bytes + does the crypto; the app
  decides what the bytes are and how to merge them.
- NostrSyncTransport: NIP-78 app-data (kind 30078, addressable/replaceable
  per device via the d-tag), content NIP-44-encrypted TO SELF, discovery
  filtered to your own author key. Each device keeps one replaceable record.

Tests (MiniRelay, pure Dart): a snapshot replicates to the identity's other
device; the relay only ever sees ciphertext; another identity neither
receives nor could decrypt; re-push replaces; two devices keep their own.

Confirms the open-decisions §D.4 guarantee (sync leaks neither the key nor
plaintext). NEXT slice (app): a SyncService that serializes the inventory
(reusing ExportImportService), pushes on mutation, and runs the existing
idempotent importInventory on receive; a stable per-install device id;
wire sync into SocialSession.
2026-07-10 23:16:07 +02:00
..
geohash_test.dart feat(block2): geohash encoder in commons_core (for 'use my location') 2026-07-10 03:18:30 +02:00
nostr_ids_test.dart feat(trust): full Duniter web-of-trust membership (params + referents) 2026-07-10 21:02:08 +02:00
nostr_profile_test.dart feat(block2): Ğ1 — publish a Ğ1 address + 'Pay in Ğ1' in chat (levels 1-2) 2026-07-10 13:06:38 +02:00
nostr_sync_transport_test.dart feat(sync): encrypted device-to-device sync transport (core foundation) 2026-07-10 23:16:07 +02:00
nostr_transports_test.dart feat(market): host and publish the cover photo with each offer 2026-07-10 21:12:36 +02:00
relay_pool_test.dart feat(block2): relay pool — publish to many relays, discover deduped, tolerate failures 2026-07-10 10:35:39 +02:00
web_of_trust_test.dart feat(trust): full Duniter web-of-trust membership (params + referents) 2026-07-10 21:02:08 +02:00