feat(block2): Nostr transport backend in commons_core (all 3 contracts)

Second production slice: the concrete Nostr backend on the shared connection,
using the vetted nostr package's crypto (NIP-44 spec-vector tested, gift wrap).

- NostrConnection: one dart:io WebSocket + identity + EVENT/OK, REQ/EOSE via
  the library's Event/Filter/Request. Pure Dart, no Flutter.
- NostrOfferTransport (NIP-99 kind 30402) + Nip99Codec: geohash coarsened to a
  NIP-52 prefix ladder on the wire; Offer stays inventory/location-agnostic.
- NostrMessageTransport (NIP-17): send/inbox via the library's DirectMessage
  gift-wrap onion.
- NostrTrustTransport (custom addressable kind 30777): certify/revoke/discover.
- MiniRelay test support + integration tests: offers, messaging (metadata
  privacy), WoT membership + revoke, and trust-filters-offers — all over ONE
  shared connection, hermetic in-process relay.

Renamed the core offer lifecycle enum OfferStatus -> OfferLifecycle to avoid
colliding with app_seeds' sharing-intent OfferStatus (no Block 1 code touched;
app_seeds analyzes clean, 0 errors). commons_core: 55 tests green.
This commit is contained in:
vjrj 2026-07-10 02:38:50 +02:00
parent edb480b21b
commit 2b58fe40ce
10 changed files with 791 additions and 3 deletions

View file

@ -57,6 +57,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.9"
bech32:
dependency: transitive
description:
name: bech32
sha256: "156cbace936f7720c79a79d16a03efad343b1ef17106716e04b8b8e39f99f7f7"
url: "https://pub.dev"
source: hosted
version: "0.2.2"
bidi:
dependency: transitive
description:
@ -65,6 +73,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.13"
bip340:
dependency: transitive
description:
name: bip340
sha256: "4c2df9fa2409d26f1d9334b2801015ebe4dc3978191f186743e60e89a90230c4"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
bloc:
dependency: transitive
description:
@ -281,6 +297,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.31.0"
elliptic:
dependency: transitive
description:
name: elliptic
sha256: "67931d408faa353bdebac9f7a1df0c3f6f828f4e8439cdf084573cd1601a2f4b"
url: "https://pub.dev"
source: hosted
version: "0.3.12"
equatable:
dependency: transitive
description:
@ -796,6 +820,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.2"
nostr:
dependency: transitive
description:
name: nostr
sha256: "44d602199d032e40a469b8e00e3c58e1b0c206673e0edf4a4a468499f75f6298"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
objective_c:
dependency: transitive
description:
@ -924,6 +956,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.8"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: "92aa3841d083cc4b0f4709b5c74fd6409a3e6ba833ffc7dc6a8fee096366acf5"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
pool:
dependency: transitive
description: