Channels
A channel is a composition, not a new verb and not a new mode: a
kind-30110 governance descriptor + kind-30111 posts + an opt-in
kind-30114 directory listing + a Bitcoin-priced write
gate. v1 ships public channels (public read, signed posts, Bitcoin-gated
write). Private/encrypted channels are reserved behind the same descriptor —
one descriptor, phased by its read + encryption fields.
A public channel makes NO E2EE claim. It uses OC Lock's identity binding (BIP-322 device signatures) and OC Chat's Bitcoin-priced access control, not its confidentiality. Clients MUST NOT carry the DM "relays learn nothing" headline onto channel posts — relays, readers, and archives see the plaintext body and the author's Bitcoin address forever. This is the inverse of the 1:1 product, and it must be loud in any UI that hosts both.
The channel descriptor — kind 30110Link to this section
One descriptor per channel, signed by the founder's inbox key,
BIP-322-rooted to founder_address via that device's kind-30078 record. It is
the single source of truth for identity, roles, and the read/write policy.
Content-addressed.
// kind 30110, addressable. Every version has its own coordinate (OC Chat 0.3.0):
// d-tag = "oc-lock-chat-ch:" || descriptor_id
// t-tag = channel_id (a reader fetches every version with {"#t": [channel_id]})
// s-tag = supersedes (every version but the genesis; a reader walks forward by it)
// binding = the signer's kind-30078 device record (JSON), outside descriptor_id
{
"v": 1,
"channel_id": "<hex = SHA-256('oc-lock-chat-ch/v1:' || founder_address || ':' || slug)>",
"slug": "<[a-z0-9-]{3,48}; NON-authoritative display label>",
"founder_address": "<bitcoin address OR did:oc:...; the channel's trust root>",
"founder_inbox_pubkey": "<hex; the event pubkey; bound to founder_address via kind-30078>",
"read": "public", // "public" (v1) | "members" (reserved)
"encryption": null, // null ⇒ public (v1)
"write": {
// EXACTLY ONE policy
"policy": "utxo-floor", // "utxo-floor" | "allowlist" | "founder" | "open"
"utxo_floor_confs": 144,
"utxo_floor_sats": 0,
"allowlist_root": null,
"rooted": true, // MUST be true for utxo-floor; false for the others
},
"admins": [], // may replace the descriptor + post any tombstone
"moderators": [], // may post removal tombstones ONLY
"title": "<=80>",
"description": "<=280>",
"rules": "<=1000, optional>",
"directory_opt_in": false,
"created_at": 1733846400,
"supersedes": null, // descriptor_id of the prior version, or null for genesis
}
// descriptor_id = SHA-256(canonical(content))
Normative rules a conforming client MUST honor:
channel_idbinds tofounder_address— identity isSHA-256(founder_address || slug). Two founders may reuse aslug→ differentchannel_ids. The slug is non-authoritative; the client MUST renderfounder_address+ its trust tier alongside the slug.- Every version keeps its own coordinate. Each version, the genesis
included, is published at
"oc-lock-chat-ch:" || descriptor_idwith attag equal tochannel_id, so no version replaces another at a relay, and every version but the genesis has anstag equal to itssupersedes. A reader fetches{"kinds":[30110],"#t":[channel_id]}, paging up to a bound it states, plus the salted legacy d-tag"oc-lock-chat-ch:" || base64url(SHA-256("oc-lock-chat-ch/v1:" || channel_id))for channels published before 0.3.0. Nothing is published at the legacy d-tag. - Reading past a flood. Anyone can publish under the
tandstags, so a reader also reads the versions the founder's keys signed (#twithauthors), then walks forward from each by#s, with each key of the founder and the admins that version names. It reads every key those addresses have ever bound, revoked ones included, one key per read: an earlier version stands on its binding whatever became of the key since. It walks forward only from versions those reads returned. When an open read stops at its bound, the reader says the channel could not be read, never that it does not exist, unless a chain resolves and those reads were complete. - The descriptor is a governance hash-chain. Every change (add admin, raise
the floor, change policy) is a new kind-30110 version with
supersedes→ the priordescriptor_id. A client MUST validate the new descriptor's signing inbox key is device-bound (kind-30078) to the founder OR an address in the prioradminsset — making governance tamper-evident and offline-verifiable (theparent_idtrick applied to governance). A descriptor not so authored isE_CH_UNAUTHORIZED. - Any authorized copy of a descriptor counts. The signing key is in the
event, outside
descriptor_id, so one descriptor can arrive in events under different keys. A resolver keeps every such event and accepts the descriptor if any one copy is authored as above (OC Chat 0.2.1). - Each version carries its signer's binding; the last version needs a live
key. The
bindingtag holds the device record that binds the event's key: an OC Lock v3 record for a Bitcoin address, or a session record with its ochk.io vouch for adid:oc. A version with a later version after it stands on that binding. The last version of a chain also needs it to be live, with no revocation seen on any relay; otherwise the chain ends at the version before it (OC Chat 0.3.0). - At a fork, the founder's live branch wins. Versions on chains that resolve
and supersede the same parent, and the geneses of one channel, rank:
founder-signed with a live binding first, founder-signed with a binding since
revoked second, any other third. Branches through a lower rank are overruled.
Among the tips left (a tip is a version nothing supersedes), a closed tip
wins, then the longest chain, then the freshest signed
created_at, then the lowestdescriptor_id, so every reader holding the same versions shows the same channel (OC Chat 0.3.2). - Close is founder-only and forward-effective. A close is a version with
status:"closed": it stops new posts and erases nothing. Only the founder changesstatusorsuccessor_channel_id; an admin's version that changes either isE_CH_UNAUTHORIZED. To re-open, the founder supersedes every closed tip. - Revoking a device. A device that was replaced has the channels it signed last re-signed, as they stand, from a live device. A device that may be in someone else's hands is never re-signed as it stands: the client shows every version it signed, republishes from a live device the ones on the way to the version you confirm, and publishes that version again. If it held the channel's inbox key, the client starts a new genesis instead.
- A founder can re-sign a channel. When no version verifies, or the device
holding the inbox key is revoked: a new genesis for the same
channel_id, from a bound device, with the settings carried over. Posts are keyed bychannel_idand stay. - Exactly one
write.policy, with arootedflag that MUST match it.utxo-floor⇒rooted:true;allowlist/founder/open⇒rooted:false. A mismatch isE_CH_POLICY_INVALID. This makes the Bitcoin claim a property of the artifact, not a UI label.
The write gate (the Bitcoin-load-bearing axis)Link to this section
| Policy | rooted | Ed25519 verdict | Behaviour |
|---|---|---|---|
utxo- | true | passes | Author proves control of a funded UTXO of age ≥ utxo_ (the directory gate applied to write). Spam is priced in Bitcoin maturity. The v1 default. |
allowlist | false | fails | Writers are the addresses hashing to allowlist_; a signature-only gate, not Bitcoin-load-bearing. Muted "via ochk.io" tier. |
founder | false | fails | Only founder + admins post (an announcement channel). |
open | false | fails | Anyone with a valid device posts. Legal but defaulted-against. |
pay- | — | (reserved) | Lightning postage per post — a kind-30115 registry extension, NOT v1-canonical (needs an invoice round-trip + spent-ledger, so it is not offline-verifiable). |
The utxo-floor write_proof is height-anchored and names one coin, which
a reader checks against public chain data (its own node or explorer):
"write_proof": {
"outpoint": "<txid:vout>",
"value_sats": 100000,
"anchor_block_height": 899000,
"anchor_block_hash": "<hex>", // pins the anchor
"control_sig": "<BIP-322 by the UTXO's address over post_id>"
}
Every reader checks four things against its own node or explorer, and fails
closed: a post whose proof it cannot check is not shown. First, the coin: the
transaction's output at vout must pay author_address exactly value_sats,
be confirmed at anchor_block_height in the block anchor_block_hash names,
and be unspent (a spend still in the mempool counts as spent). Then
control_sig over post_id, value_sats >= utxo_floor_sats, and
current_tip_height - anchor_block_height + 1 >= utxo_floor_confs using the
reader's own tip. Below-floor, bad-signature, or a coin that is missing, spent
or different ⇒ E_CHAN_FLOOR. chat.ochk.io reads each coin once per distinct
outpoint and the tip once per render batch, never per post. A read with no
answer (a rate limit, a server error, a timeout) leaves the post unchecked:
it is not shown and not refused, and chat.ochk.io says how many posts it could
not check.
Only utxo-floor (and the deferred pay-to-post) carry the Bitcoin
claim. The rooted:false flag is structural, and a conforming client MUST
render a non-rooted channel in the muted "via ochk.io" tier exactly as a
did:oc identity. Membership by signature alone is not a Bitcoin gate — v1
says so on every surface, and defaults the create flow to utxo-floor.
Channel posts — kind 30111Link to this section
A public post is an addressable kind-30111 event, the chat-channel envelope,
recipients=[], plaintext body, signed by the author's inbox key bound to
author_address via kind-30078. It carries an indexable ["t", channel_id] tag
so a reader can fetch one channel's posts relay-side. An optional inline
attachment (same shape as a
DM attachment) is
public — committed to post_id, capped at a small inline ceiling (readers
render at most 100 KiB; chat.ochk.io sends at most 48 KiB), not a file-hosting
layer.
A conforming reader MUST:
- Verify the author device signature + kind-30078 binding — a post with no
resolvable signature is
E_CH_UNAUTHORIZEDand MUST NOT render (authorship is never optional). - Evaluate the channel's
write.policy— a post failing the gate isE_CH_WRITE_DENIEDand MUST NOT render. - Confirm the author is permitted to write — a reader-only role posting is
E_CH_NOT_WRITER. - Order the feed deterministically. A public multi-author channel has no
single hash-chain (independent broadcasters), so a top-level post sets
parent_id:nulland the feed is ordered by the eventcreated_atas a display hint, tie-broken by the content-addressedpost_idso any two clients agree.created_atis untrusted; thepost_idtiebreak makes ordering stable + reproducible. A non-nullparent_idthreads an explicit reply under its parent. (This relaxes the strict DM chain rule — channels are fan-out.)
Roles & moderationLink to this section
Five roles, all enforced offline by signature against the current descriptor epoch:
| Role | May |
|---|---|
| founder | anything, including replace the descriptor (the trust root) |
| admin | replace the descriptor + post any tombstone |
| moderator | post removal tombstones only |
| writer | post, gated by the write policy |
| reader | read only (a reader post is E_) |
Moderation is by tombstone: an admin/moderator publishes a kind-30111
removal tombstone (body:"", a removes field naming the target post_id).
Removal is forward-effective only — conforming clients hide the target on
sight, but scraped copies are not retracted. A tombstone by a non-roster signer
is E_CH_UNAUTHORIZED. A channel admin is the family's first per-room named
trust anchor: every admin action is an auditable signed artifact (the
governance chain), but auditable is not preventable in v1 — a single founder
is a single point of trust, disclosed (see Security S-CH-5).
Source-intake (institutional composition)Link to this section
A SecureDrop-shaped one-way tip line is a composition of shipped primitives,
not a new ceremony: a public intake channel (write:"open" or utxo-floor) is
the org's advertised drop; a source the org does not pre-know posts material
under a fresh throwaway identity; the org reads the public post and replies
privately by gift-wrapping a speak-now DM to the post's
author_inbox_pubkey. The inbound submission is public; only the reply
is E2EE.
Honest boundary (S-M7-2): the intake post is public and permanent — only the org's reply is private. A conforming intake client warns the source at submission time, defaults the source to a fresh throwaway identity, and never claims SecureDrop-grade anonymity for the inbound leg. Two opt-in hardenings ride on top: an org-run NIP-42 AUTH relay hides the reply's recipient tag from passive observers, and a named-Fedimint postage last-mile lets a staff recipient with no Lightning node still accept pay-to-reach. Both are protocol options; chat.ochk.io offers neither.
Private channels (reserved — not v1)Link to this section
read:"members" + an encryption block (scheme ∈ {rewrap, sender-keys, mls})
under the same kind-30110 descriptor enables private channels in a later
phase, using the reserved kind-30113 group-key rotation record. The descriptor,
roles, write gates, moderation, and governance chain are inherited unchanged;
only the encryption block + the epoch machine are added. v1 does not implement
this — the public-channel descriptor is forward-compatible by a flag, not a
format break. The member-to-member roster leak and the epoch forward-secrecy
blast radius apply only to those phases.
NextLink to this section
- Discoverability directory — the kind-30114 listing channels compose with.
- Transport & durable inbox — relay AUTH for institutional metadata hardening.
- Security posture — S-CH-1 through S-CH-7 and the source-intake disclosures.