Function: isPlcDid()
isPlcDid(
did):boolean
Defined in: src/types/atproto-validators.ts:98
Reports whether a string is a well-formed did:plc: identifier.
Parameters
did
string
Candidate DID string
Returns
boolean
True when the value is did:plc: followed by 24 base32-sortable characters
Remarks
PLC identifiers are exactly 24 characters drawn from the base32-sortable
alphabet (a–z, 2–7). toDID deliberately does not enforce this:
it accepts any syntactically plausible DID across every method, and hundreds
of test fixtures rely on short readable placeholders.
This stricter check exists for values that must be a real PLC identity rather
than a plausible-looking string — configuration in particular. The governance
PDS DID was configured as did:plc:chive-governance in every environment
file, which is not a PLC identifier at all; nothing rejected it, and the
governance sync resolved nothing for as long as it was set.