Namespaced Identifiers (NSIDs).
NSIDs name Lexicon schemas (and thus record collections / XRPC methods), for
example app.bsky.feed.post or com.atproto.repo.getRecord.
Syntax rules (see the NSID spec):
- At least 3 segments, max total length 317 characters.
- The domain authority segments (all but the last) are each 1-63 characters of
[a-zA-Z0-9-], not starting or ending with a hyphen. The first segment (the TLD) must not start with a digit. - The final segment (the name) is 1-63 characters of
[a-zA-Z0-9]only (no hyphens) and must not start with a digit.
Examples
iex> Exosphere.ATProto.NSID.valid?("app.bsky.feed.post")
true
iex> Exosphere.ATProto.NSID.parse("app.bsky.feed.post")
{:ok, %{authority: "app.bsky.feed", name: "post", segments: ["app", "bsky", "feed", "post"]}}