Discoverability directory
Your device record already is your inbox: anyone who knows your Bitcoin address can reach you. The directory adds the missing half — being found by a human-readable handle without the searcher knowing your address. It is strictly opt-in, revocable, and graduated, and the default is invisible: a conforming client publishes no directory record unless you explicitly opt in.
The directory is a kind-30114 addressable (NIP-33-replaceable) Nostr event.
The listing recordLink to this section
A listing is signed by your inbox key (deriveNostrKey(device_sk) — the
same key that signs gift-wraps):
// kind 30114, addressable.
// d-tag = "oc-lock-chat-dir:" || base64url(SHA-256("oc-lock-chat-dir/v1:" || lower(handle)))
{
"v": 2,
"handle": "<[a-z0-9_]{3,32}>",
"address": "<bitcoin address the inbox key is bound to>",
"inbox_pubkey": "<hex; the reachability pointer = the event pubkey>",
"claim": {
"outpoint": "<txid:vout of a coin paying to address>",
"nonce": "<64 lowercase hex>",
"ots": "<base64 OpenTimestamps proof over claim_id>",
"repoints": [], // optional, at most 16
},
"display_name": "<=48 chars, optional>",
"bio": "<=80 chars, optional>",
"avatar": "<small inline raster data: URL, ≤24KB, optional>",
"opted_in": true,
"created_at": 1733846400,
}
// listing_id = SHA-256(canonical(content)) // content-addressed
// claim_id = SHA-256(canonical({v: 1, handle: lower(handle), address, outpoint, nonce}))
The claim is what orders the handle. It names the coin that backs it and is
anchored in Bitcoin with OpenTimestamps; its anchor is the height of the proof's
lowest Bitcoin attestation, once that has 6 confirmations. A v: 1 listing
carries no claim and holds no handle.
The d-tag is a salted hash of the handle, so a conforming directory is
lookup-by-known-handle, never enumerate-all — there is no GET /all and no
bulk-dump. It is keyed by the handle hash, not the raw address (a raw-address
key would be deterministically enumerable).
avatar is an inline data: raster URL, never an external link. An
external https avatar would turn every directory lookup into a tracking
pixel leaking the viewer's IP + timing, and a non-content-addressed image
could be swapped after signing. A conforming client renders an avatar only
if it is a bounded raster data: URL — never image/svg+xml, text/html, or
any non-raster type (the data:/blob-URL XSS class). An
unsafe or oversized avatar is dropped; the listing still resolves.
The Bitcoin gate (NORMATIVE)Link to this section
A bare listing is not Bitcoin-load-bearing: "address X, here is my inbox key, signed by X" substitutes perfectly to an Ed25519 npub signed by an npub. A conforming resolver MUST refuse to honor a claim unless all four hold:
- The kind-30114 event is signed by
inbox_pubkey. inbox_pubkeyis bound toaddressvia a valid kind-30078 device record (the existing BIP-322 binding). The directory inherits its Bitcoin proof from the device record — no second wallet ceremony.- The claim's coin cleared the floor at its anchor, and the claim still
stands on a coin. The
outpointpays toaddress, carries at least the deployment'sdir_floor_sats, and confirmed at leastdir_floor_confsblocks before the anchor. The claim's current coin (itsoutpoint, or the coin a re-point moved it to) has not been spent by a transaction withdir_repoint_blocks + 6or more confirmations. This is the load-bearing hook — an Ed25519 keypair has no analog to a coin that was already aged when the claim was anchored, so a handle costs Bitcoin maturity to claim (Sybil-resistance doubling as anti-squat). UTXO state is public chain data, so the check preserves offline-verifiability. - The claim is anchored: its OpenTimestamps proof's lowest Bitcoin attestation verifies and has at least 6 confirmations.
The RECOMMENDED v0 values are any funded output (dir_floor_sats = 1), 144
confirmations (~1 day) at the anchor, and a re-point window of 1008 blocks (~1
week) after the backing coin is spent. A claim that fails the gate MUST be
treated as un-listed (E_DIR_UNVERIFIED). A handle belongs to the earliest
claim anchored in Bitcoin that still stands — ordered by a block height no
claimant chooses, not by global consensus — and the address is the trust
root; the handle is a non-authoritative display label. A did:oc-only
identity (the session bridge, no Bitcoin address) MAY publish a bridge listing
but MUST NOT claim a scarce handle; a conforming client surfaces it with a muted
"via ochk.io" tier and prompts attaching a Bitcoin address to graduate.
The social-graph firewall (NORMATIVE)Link to this section
The listing record MUST NOT contain, reference, or be co-indexed with any
queue_id, recv_queue, conversation_id, contact list, or message-routing
metadata.
The directory reveals a NODE — "this identity is reachable" — and NEVER an EDGE — who messages whom.
The only reachability pointer it republishes is inbox_pubkey, which a sender
who resolved your handle needs anyway and which the device record already
exposes. This is the same firewall that keeps the
Requests allowlist private.
Revocation (forward-effective only)Link to this section
Self-removal = publish a replacement kind-30114 event with the same d-tag,
opted_in: false, an "ends": "<claim_id>" naming the claim it withdraws,
optional fields stripped, signed by the inbox key. Because the event is
NIP-33-addressable, the tombstone replaces the prior record at conforming
relays. A conforming client treats a tombstone — or an absent record — as
not-discoverable, refuses to resolve the handle to that address, treats a
tombstone seen on any relay as authoritative over that same owner's older
live copies even if a stale one exists elsewhere, and SHOULD fire a NIP-09
deletion request. A claim_id that a tombstone ends never counts again, so
listing again takes a new claim, behind every claim anchored before it.
Revocation is forward-effective only. A tombstone stops new resolution on conforming relays; it cannot retract copies on non-conforming relays, archives, or scrapers. The promise is "stop new discovery," never "delete yourself completely." This is disclosed verbatim at opt-in time. Removal does not unsend or break existing conversations.
ResolutionLink to this section
To find a user, a client computes the d-tag from the queried handle and reads
the kind-30114 events for it: the deployment's directory relay
(wss://relay.ochk.io) completely, and 2 or more public relays as a bounded
audit, verifying each event under NIP-01 before it drops a duplicate or merges
the relays' answers (SPEC §8). It orders the live claims by (anchor height,
claim_id) and walks that order. Each address's state is its freshest record
by created_at, compared only within that one address; a tombstone signed by a
bound key ends the claim it names. The first claim whose binding and backing
coin stand holds the handle. A read that gets no answer stops the walk with
E_DIR_UNRESOLVED rather than pass a claim over. On success the client surfaces
address + profile + a trust tier so the user can start a thread.
First-contact still passes the recipient's anti-spam policy —
being listed is not a free-message bypass. Privacy-sensitive resolution
SHOULD query relays directly, not a third-party indexer (which would learn
who-searches-for-whom).
The honest disclosuresLink to this section
A directory is a powerful deanonymizer, and the protocol names every edge:
| # | Disclosure |
|---|---|
| S14 | The directory is a reachability oracle: the salted handle stops BULK enumeration, not TARGETED confirmation of a guessed handle. Anything published is permanently harvestable. |
| S15 | Revocation is forward-effective only — a tombstone cannot make an archive forget an indexed handle. |
| S16 | A public handle is an intentional deanonymization: it binds a human name to your Bitcoin address (whose on-chain history is public) and your ochk. footprint. A feature for the user who chooses it — stated plainly; the invisible default is the mitigation. |
| S17 | Handles are non-authoritative; the address is the trust root. A client MUST render the address + trust tier alongside any handle and verify the gate before honoring it. |
See Security posture for the full text.
Channels in the directoryLink to this section
A public channel with directory_opt_in: true MAY publish a
listing under the same opt-in, UTXO-gated, tombstone-revocable rules as a
person — but in a distinct handle namespace (oc-lock-chat-chdir:) so a
channel handle can never collide with a person's. A did:oc-founded channel
cannot claim a directory handle (the anti-squat floor applies unchanged). The
firewall holds: a public channel reveals a NODE (the channel exists, its
founder), never a member roster.
NextLink to this section
- Channels — founder-rooted public channels and their directory composition.
- Transport & durable inbox — the reachability layer the directory points at.
- Security posture — S14–S17 in full.