atproto_core.did_doc.did_doc¶
- class atproto_core.did_doc.did_doc.DidDocument¶
Bases:
BaseModel
DID document.
- field also_known_as: List[str] | None = None¶
- field id: str [Required]¶
- field verification_method: List[VerificationMethod] | None = None¶
- classmethod from_dict(did_doc: Dict[str, Any] | Any) DidDocument ¶
Parse a DID document.
- Parameters:
did_doc – The raw DID document.
- Returns:
The parsed DID document.
- Return type:
- get_did() str ¶
Return the DID of the given DID document.
- Returns:
The DID of the given DID document.
- Return type:
str
- get_did_key() str | None ¶
Return the DID key of the given DID document.
- Returns:
The DID key of the given DID document, or
None
if not found.- Return type:
str
- get_feed_gen_endpoint() str | None ¶
Return the feed generator endpoint of the given DID document.
- Returns:
The feed generator endpoint of the given DID document, or
None
if not found.- Return type:
str
- get_handle() str | None ¶
Return the handle of the given DID document.
- Returns:
The handle of the given DID document, or
None
if not found.- Return type:
str
- get_notif_endpoint() str | None ¶
Return the notification endpoint of the given DID document.
- Returns:
The notification endpoint of the given DID document, or
None
if not found.- Return type:
str
- get_pds_endpoint() str | None ¶
Return the personal data server endpoint of the given DID document.
- Returns:
The personal data server endpoint of the given DID document, or
None
if not found.- Return type:
str
- get_service_endpoint(id_: str, type_: str) str | None ¶
Return the service endpoint of the given DID document.
- Parameters:
id – The service ID.
type – The service type.
- Returns:
The service endpoint of the given DID document, or
None
if not found.- Return type:
str
- get_signing_key() SigningKey | None ¶
Return the signing key of the given DID document.
- Returns:
The signing key of the given DID document, or
None
if not found.- Return type:
- to_atproto_data() AtprotoData ¶
Return the AtprotoData of the given DID document.
- Returns:
The AtprotoData of the given DID document.
- Return type:
AtprotoData
- class atproto_core.did_doc.did_doc.Service¶
Bases:
BaseModel
Service.
- field id: str [Required]¶
- field service_endpoint: str | Any [Required]¶
- field type: str [Required]¶
- class atproto_core.did_doc.did_doc.SigningKey(type: str, public_key_multibase: str)¶
Bases:
object
Public signing key for the account.
- public_key_multibase: str¶
- type: str¶
- class atproto_core.did_doc.did_doc.VerificationMethod¶
Bases:
BaseModel
Verification method.
- field controller: str [Required]¶
- field id: str [Required]¶
- field public_key_multibase: str | None = None¶
- field type: str [Required]¶
- atproto_core.did_doc.did_doc.is_valid_did_doc(did_doc: Dict[str, Any] | Any) bool ¶
Return whether the given DID document is valid.
- Parameters:
did_doc – The raw DID document.
- Returns:
Whether the given DID document is valid.
- Return type:
bool