Implement end-to-end encrypted buyer/seller messaging
Wire format (internal/message): sealed boxes to the listing's device key (X25519 + HKDF + ChaCha20-Poly1305), padded, proof-of-work stamped, with signed owner replies and address grants. Relay validation, bounded queues, gossip on per-region message topics and sync (store, p2p). Owner side (internal/inbox, API): inbox with hidden link messages and a per-day new-thread limit, replies, grants, and a private per-listing address. Public POST/GET /api/v1/messages for buyers. Browser: noble-based sealing and reply verification checked against a Go fixture, contact form, conversation view, message list, de/en strings. Docs: PROTOCOL.md messaging section matches the implementation. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<body>
|
||||
<header class="top">
|
||||
<a class="brand" href="#/">Allmende</a>
|
||||
<nav id="nav" class="nav"></nav>
|
||||
<span id="status" class="status"></span>
|
||||
</header>
|
||||
<main id="app"></main>
|
||||
|
||||
@@ -212,3 +212,27 @@ pre {
|
||||
.detail-head { flex-direction: column; }
|
||||
.kv { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* Messages */
|
||||
.nav { margin-left: auto; }
|
||||
textarea {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 8px 10px;
|
||||
font: inherit;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
resize: vertical;
|
||||
}
|
||||
textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
|
||||
.compose .actions { margin-top: 8px; align-items: center; }
|
||||
.small { font-size: 0.85rem; }
|
||||
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
|
||||
.thread, .convs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
|
||||
.msg { max-width: 85%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
|
||||
.msg.out { justify-self: end; border-color: var(--accent); }
|
||||
.msg .who { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }
|
||||
.grant { border: 2px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 4px 0; }
|
||||
input[readonly] { width: 100%; box-sizing: border-box; }
|
||||
|
||||
Reference in New Issue
Block a user