client.service module¶
-
class
factom_did.client.service.
Service
(alias, service_type, endpoint, priority_requirement=None, custom_fields=None)¶ Bases:
object
Represent a service associated with a DID. A service is an end-point, which can be used to communicate with the DID or to carry out different tasks on behalf of the DID (such as signatures, e.g.)
-
alias
¶ A human-readable nickname for the service endpoint.
Type: str
-
service_type
¶ Type of the service endpoint (e.g. email, credential store).
Type: str
-
endpoint
¶ A service endpoint may represent any type of service the subject wishes to advertise, including decentralized identity management services for further discovery, authentication, authorization, or interaction. The service endpoint must be a valid URL.
Type: str
-
priority_requirement
¶ A non-negative integer showing the minimum hierarchical level a key must have in order to remove this service.
Type: int, optional
-
custom_fields
¶ A dictionary containing custom fields (e.g “description”: “My public social inbox”).
Type: dict, optional
-
static
from_entry_dict
(entry_dict, version='1.0.0')¶
-
full_id
(did)¶ Returns: The full id for the service, constituting of the DID_METHOD_NAME, the controller and the service alias. Return type: str
-
to_entry_dict
(did, version='1.0.0')¶ Converts the object to a dictionary suitable for recording on-chain.
Parameters: - did (str) – The DID to which this service belongs.
- version (str) – The entry schema version
Raises: NotImplementedError
– If the entry schema version is not supported
-