AT Protocol Data¶
- class atproto_identity.did.atproto_data.AtprotoData(did: str, signing_key: str | None = None, handle: str | None = None, pds: str | None = None)¶
Bases:
object
Dataclass for atproto data.
- did: str¶
- classmethod from_did_doc(did_doc: DidDocument) AtprotoData ¶
Create AT Protocol data from DID document.
- Parameters:
did_doc – DID document.
- Returns:
AT Protocol data.
- Return type:
- handle: str | None = None¶
- pds: str | None = None¶
- signing_key: str | None = None¶
- atproto_identity.did.atproto_data.ensure_atproto_document(did_doc: DidDocument) AtprotoData ¶
Ensure that the DID document is an AT Protocol DID document.
- Parameters:
did_doc – DID document.
- Returns:
AT Protocol data.
- Return type:
- Raises:
AtprotoDataParseError – If the DID document is not an AT Protocol DID document.
- atproto_identity.did.atproto_data.ensure_atproto_key(did_doc: DidDocument) str ¶
Ensure that the DID document has AT Protocol signing key.
- Parameters:
did_doc – DID document.
- Returns:
AT Protocol signing key.
- Return type:
str
- Raises:
AtprotoDataParseError – If the DID document does not have an AT Protocol signing key.