at_primitives library
Classes
- AtUri
- This is the Dart implementation of AT Uri in AT Protocol.
- CheckedAtUri
- NSID
- This is the Dart implementation of NSID in AT Protocol.
- ParsedNSID
- UncheckedAtUri
- UnparsedNSID
Functions
-
ensureValidAtUri(
String uri) → void -
ensureValidDid(
String did) → void - Human-readable constraints:
-
ensureValidHandle(
String handle) → void - Handle constraints, in English:
-
ensureValidNsid(
String nsid) → void -
isValidHandle(
String handle) → bool -
Returns true if
handleis valid, otherwise false. -
normalizeAndEnsureValidHandle(
String handle) → String -
Returns the lower cased
handleafter validation by ensureValidHandle. -
normalizeHandle(
String handle) → String -
Returns the lower cased
handle.
Exceptions / Errors
- InvalidAtUriError
- Thrown to indicate that AT Uri is not valid.
- InvalidDidError
- Thrown to indicate that DID didn't valid.
- InvalidHandleError
- Thrown to indicate that handle didn't valid.
- InvalidNsidError
- Indicates that the passed NSID could not be parsed.