Files
raucao ca7ba5d8d7 Show identity keys in one style, and verify NIP-05 before showing it
Every key in the app is now the same kind of thing: `plain::key` /
`.key-value` renders it in the monospace font at the size the label already
has, as a fixed `head…tail` cut, so a column of them lines up. Deliberately
not libadwaita's `.monospace`, which also switches to the code size and, on an
`AdwActionRow`, takes the field name with it. The identities list shows the
name over the key alone (it used to be "Profile · npub" on one line, where a
long profile name ate the key's tail), and the switcher keeps its own shorter
npub cut and renders it at `.caption`: a key is never body-sized there, and the
row's bold *name* stays the loudest thing in it.

The switcher's second line prefers a NIP-05 address — but only one the domain
has confirmed for exactly this key, because a kind-0's `nip05` is
self-declared and that line is where an identity is identified.
`store::nip05` parses the address strictly (it becomes an HTTPS request, so a
sloppy parse would be an SSRF), asks
`https://<domain>/.well-known/nostr.json?name=<local>` through the icons'
hardened fetch — now split into `fetch_https(url, Content)`, the app's single
HTTP path — and shows the address only while `nip05_ok == nip05`. A
re-declared or forged address is unverified again immediately, a slow answer
for a changed one is dropped, and a failed check costs a day.

Names are no longer invented: no "Identity 3" and no "Imported 1". The create
dialog starts empty, import carries a Name field that is prefilled from a
cached profile as soon as the pasted string decodes to a key, and an empty
field stores no label at all. A discovered profile name trumps the label for
display (`identity_label`), which is what happens for a key imported before
its profile was known — the label itself is never overwritten.
2026-11-29 16:33:53 +04:00
..