fix(identity): harden corporate identity lifecycle

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
This commit is contained in:
Cea Stapleton Cordasco
2026-07-29 13:17:58 -05:00
parent bc2a16ff39
commit a11293a646
43 changed files with 4793 additions and 473 deletions

View File

@@ -12,6 +12,7 @@ type RawProfile = {
pubkey: string;
display_name: string | null;
verified_name?: string | null;
verified_name_expires_at?: number | null;
avatar_url: string | null;
about: string | null;
nip05_handle: string | null;
@@ -41,6 +42,7 @@ function fromRawProfile(profile: RawProfile): Profile {
pubkey: profile.pubkey,
displayName: profile.display_name,
verifiedName: profile.verified_name ?? null,
verifiedNameExpiresAt: profile.verified_name_expires_at ?? null,
avatarUrl: profile.avatar_url,
about: profile.about,
nip05Handle: profile.nip05_handle,
@@ -55,6 +57,7 @@ function fromRawUserProfileSummary(
return {
displayName: profile.display_name,
verifiedName: profile.verified_name ?? null,
verifiedNameExpiresAt: profile.verified_name_expires_at ?? null,
name: profile.name ?? null,
avatarUrl: profile.avatar_url,
nip05Handle: profile.nip05_handle,
@@ -68,6 +71,7 @@ function fromRawUserSearchResult(user: RawUserSearchResult): UserSearchResult {
pubkey: user.pubkey,
displayName: user.display_name,
verifiedName: user.verified_name ?? null,
verifiedNameExpiresAt: user.verified_name_expires_at ?? null,
avatarUrl: user.avatar_url,
nip05Handle: user.nip05_handle,
ownerPubkey: user.owner_pubkey,

View File

@@ -110,6 +110,8 @@ export type Profile = {
displayName: string | null;
/** Relay-authoritative display identity bound to this pubkey. */
verifiedName?: string | null;
/** Unix timestamp (seconds) after which `verifiedName` is no longer trusted. */
verifiedNameExpiresAt?: number | null;
avatarUrl: string | null;
about: string | null;
nip05Handle: string | null;
@@ -125,6 +127,8 @@ export type UserProfileSummary = {
displayName: string | null;
/** Relay-authoritative display identity bound to this pubkey. */
verifiedName?: string | null;
/** Unix timestamp (seconds) after which `verifiedName` is no longer trusted. */
verifiedNameExpiresAt?: number | null;
/** Kind-0 `name` field, kept separate from `displayName` so @mention text
* can be matched against either alias (agents/CLI resolve mentions against
* `display_name` *or* `name` at send time). */
@@ -144,6 +148,7 @@ export type UserSearchResult = {
pubkey: string;
displayName: string | null;
verifiedName?: string | null;
verifiedNameExpiresAt?: number | null;
avatarUrl: string | null;
nip05Handle: string | null;
ownerPubkey: string | null;