Compare commits

...
Author SHA1 Message Date
jack ec955751c8 Tests: stabilize FragmentationTests and InputValidatorTests
Make _test_handlePacket mark synthetic peers verified/connected with normalized senderID to avoid drops in public-message reassembly tests. Tighten validatePeerID to reject non-hex strings when length equals 16 or 64; allow internal IDs only for other lengths. All iOS simulator tests pass locally.
2025-08-25 11:46:43 +02:00
jack fcfe32b754 Improve BLE mesh relay and flooding
Add last-hop suppression using ingress-link tracking to prevent echo. Implement deterministic always-relay for handshakes and directed encrypted/fragments; widen jitter for broadcasts; keep TTL cap only for broadcast. Add deterministic K-of-N broadcast fanout to reduce amplification in dense topologies. Introduce backpressure-aware writes using canSendWriteWithoutResponse with per-peripheral queues and draining on peripheralIsReady. Minor helpers for messageID, deterministic selection, and maintenance cleanup.
2025-08-25 11:03:07 +02:00
jack acc11101ad Fix geohash linking: avoid links in @mentions
Only link #geohash tokens when not directly attached to an @mention (e.g., @name#gh stays plain). Keeps standalone #geohash tappable.
2025-08-25 09:31:41 +02:00
5fd9140ffa QR verification: live challenge/response over Noise; persistence, offline badges, and UX/perf polish (#510)
* QR verification scaffold: add Noise verify payload types, VerificationService with QR schema/signing, placeholder MyQR/Scan views, and UI entry points in header

* QR: fix VerificationQR mutability (sigHex var) and remove duplicate Data hex helpers to resolve redeclaration; wire signed payload assembly

* QR: render actual QR images with CoreImage; add copy button; keep scanner placeholder for now

* QR: fix SwiftUI modifiers — apply .interpolation(.none) and .resizable() to platform Image inside ImageWrapper; remove from wrapper usage

* QR: add iOS camera scanner using AVFoundation; integrate into Scan view; add NSCameraUsageDescription to Info.plist

* QR: make NoisePayloadType exhaustive in ChatViewModel switches by ignoring verifyChallenge/verifyResponse for now (placeholder)

* QR verification: speed + persistence + UX

- Inject live Noise into VerificationService; prewarm QR on app start
- Keep camera active; remove intermediate responder toast
- One-shot/dupe guards and deferred send on handshake
- Persist verified status immediately; standardize fingerprint (SHA-256)
- Show verified badge for offline favorites; mutual verification toast
- VERIFY sheet styling to match peer sheet; UI polish
- Logs to diagnose verified load + favorites mapping

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2025-08-24 23:19:58 +02:00
e6903456ab NIP‑17/44: XChaCha20 v2 gift wraps, DM kind=14, receipts + UI fixes (#506)
* NIP-17/44: adopt NIP-44 v2 (XChaCha20-Poly1305, v2: base64url), switch rumor kind to 14, randomize BIP-340 aux; add XChaCha20Poly1305Compat and wire-up

* Nostr DMs: ensure delivered/read acks are sent even without Noise key mapping by falling back to direct Nostr (geohash-style) acks to sender pubkey

* NIP-44 v2 decrypt: try both Y parities for x-only sender pubkeys (even then odd) to fix unwrap authentication failures

* Tests: add NIP-44 v2 ACK round-trip tests (delivered/read) using bitchat1 embedding and gift-wrap decrypt path

* UI: fix DM autoscroll IDs by using dm:<peer>|<id> for private chat item IDs and preserve anchors, ensuring scrollTo targets exist when opening/switching/new messages

* UI: fix string interpolation in DM/geohash context keys (remove escaped interpolation) to resolve 'unused ch' warnings and ensure proper IDs

* UI: MeshPeerList shows transport state icon: radio for mesh-connected, purple globe for mutual favorite/Nostr; fallback dim person for others

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2025-08-24 17:56:43 +02:00
1029 changed files with 1582 additions and 162 deletions
@@ -0,0 +1 @@
[{"type":1,"name":"C5C67AE61A322FBBC90B5C8FE31F44"}]
@@ -0,0 +1 @@
[{"type":1,"name":"E76911D1F63AFE862FE85FDD58BA22"}]
@@ -0,0 +1 @@
[{"name":"2A06FD9C403255A7D7F7DD4C1D5411","type":1}]
@@ -0,0 +1 @@
[{"name":"2B2DF013CC35109F0E84824218C371","type":1}]
@@ -0,0 +1 @@
[{"name":"272A5ACD643F35A14D9D0C7D97FDBD","type":1}]
@@ -0,0 +1 @@
[{"name":"02A2B24D353061AA8ED3B5CAE135FA","type":1}]
@@ -0,0 +1 @@
[{"name":"1846F3D1223CD89DB37574063303CC","type":1}]
@@ -0,0 +1 @@
[{"name":"298FB4DD003C4885F92C170D32954D","type":1}]
@@ -0,0 +1 @@
[{"name":"6250CA76F834A1AB8ADA7C2BF60804","type":1}]
@@ -0,0 +1 @@
[{"name":"16EB30938731948B7DE73214F4EF62","type":1}]
@@ -0,0 +1 @@
[{"type":1,"name":"18D4B812B33D1DAC12B7B9582F980A"}]
@@ -0,0 +1 @@
[{"name":"8F8E36790E3B91AC0D6C1DE4AA4B84","type":1}]
@@ -0,0 +1 @@
[{"type":1,"name":"7241625CC9378F9B48DF34B4275067"}]
@@ -0,0 +1 @@
[{"name":"F70FD7F495326FAAF8F5F6678ECDB7","type":1}]
@@ -0,0 +1 @@
[{"name":"187DDE074D38699793B709B475FEA4","type":1}]
@@ -0,0 +1 @@
[{"name":"3478DD5E223636AC67FC9FF0BF6BB8","type":1}]
@@ -0,0 +1 @@
[{"name":"D33A1C5CD934A1BBDDABCE4299972C","type":1}]
@@ -0,0 +1 @@
[{"name":"EE57C07C903ABD8ABB7B65891A4B42","type":1}]
@@ -0,0 +1 @@
[{"name":"8D83F5E84E35D4934DDAD7B6D4D221","type":1}]

Some files were not shown because too many files have changed in this diff Show More