Skip to main content

record_key

Function record_key 

Source
pub fn record_key(subject: &str) -> Result<String, ResolveError>
Expand description

The record key a claim on subject is written at: the subject’s authority as its own DID spells it, decoded.

Not the hostname a caller was handed. The two differ for a development server on a port: did:web writes that colon percent-encoded, and % is not in atproto’s record-key character set, so keying by the argument produces a key no repository will accept. The server’s own poll reads at AccountDid::authority too; deriving it from the same place is what keeps the writer and the reader on one key.

§Errors

[ResolveError::Malformed] when subject is not a usable did:web.