Skip to main content

Module owner

Module owner 

Source
Expand description

Owner attestation — the unforgeable binding of a Community to its owner’s identity ( “anchored to the owner’s identity key”).

At creation the owner signs, with their IDENTITY key, a statement binding the Community’s random community_id. The proven owner is then DERIVED from the signature (event.pubkey), never asserted separately — so:

  • you cannot frame an innocent npub (that requires their key to sign), and
  • the binding can’t be transplanted to another community (the unique id is inside the signed payload, so an attestation for community X can’t be replayed as community Y’s). Members verify it against the very community id they already hold. Server-root encrypted in transit, so outsiders learn nothing; only members see who the owner is. (The community is keyless — there is no management/authority key to bind; community_id alone is the anchor.)

Functions§

build_owner_attestation_unsigned
The unsigned owner-attestation event. Sign it with the owner’s IDENTITY signer (local or bunker — it’s a normal event, so NIP-46 works) at community creation.
verify_owner_attestation
Verify an owner-attestation event (JSON). Returns the PROVEN owner pubkey iff the signature is valid AND it binds exactly this community_id. None on any missing/mismatched/forged input — the caller then treats ownership as unverified (no crown).