tane/spike/block2_spike/pubspec.yaml
vjrj 2cafc7fc12 spike(block2): de-risk NIP-17 messaging + validate shared-connection shape
Extends the Block 2 spike to attack the highest-risk unbuilt piece (private
messaging) and to prove the Q2 architecture recommendation with running code:

- NostrConnection: one shared socket+key+sign+REQ/EOSE lifecycle. Refactored
  NostrOfferTransport onto it; added NostrMessageTransport — two thin contracts
  on ONE connection (the 'one connection, three interfaces' shape).
- NIP-44 v2 encryption (secp256k1 ECDH -> ChaCha20 + HMAC, length-hiding pad).
- NIP-17/NIP-59 gift-wrap: rumor(14) -> seal(13) -> wrap(1059, ephemeral key).
  Alice->Bob DM round-trips through the relay: encrypted, sender authenticated,
  and metadata-private (relay/eavesdropper sees only ciphertext, an ephemeral
  author and the recipient p-tag — Alice stays hidden).

Findings updated: NIP-17 risk drops Medium-High -> Medium (hardening, not
feasibility); next de-risking target is the web of trust. NIP-44 not yet
vector-verified (noted). 20 tests green, analyzer clean, Block 1 untouched.
2026-07-10 02:11:54 +02:00

25 lines
1 KiB
YAML

# THROWAWAY de-risking spike for Block 2 (social layer). NOT production.
# Deliberately OUTSIDE the pub workspace (no `resolution: workspace`) so it can
# pull network/crypto deps without touching Block 1's dependency graph.
# See docs/design/spike-block2-findings.md. Delete this whole dir after the spike.
name: block2_spike
description: Throwaway prototype validating Block 2 open decisions. Do not ship.
version: 0.0.0
publish_to: none
environment:
sdk: ^3.11.5
dependencies:
# The one real dependency on production code: we consume the root identity
# seed exactly as IdentityService produces it, to prove derivation works.
commons_core:
path: ../../packages/commons_core
# Throwaway crypto/transport deps — would NOT be added like this to prod.
crypto: ^3.0.0 # sha256 + hmac for HKDF and event ids
bip340: ^0.2.0 # secp256k1 x-only pubkeys + BIP340 Schnorr (Nostr signatures)
pointycastle: ^3.9.0 # secp256k1 ECDH + ChaCha20 for NIP-44 (messaging spike)
dev_dependencies:
test: ^1.25.6
lints: ^6.0.0