client.keys.management module¶
-
class
factom_did.client.keys.management.
ManagementKey
(alias, priority, key_type, controller, priority_requirement=None, public_key=None, private_key=None)¶ Bases:
factom_did.client.keys.abstract.AbstractDIDKey
A key used to sign updates for an existing DID.
-
alias
¶ Type: str
-
priority
¶ A non-negative integer showing the hierarchical level of the key. Keys with lower priority override keys with higher priority.
Type: int
-
controller
¶ Type: str
-
priority_requirement
¶ Type: int, optional
-
public_key
¶ Type: str, optional
-
private_key
¶ Type: str, optional
-
static
from_entry_dict
(entry_dict, version='1.0.0')¶ Creates an AbstractDIDKey object from an on-chain entry
Parameters: - entry_dict (dict) – The on-chain entry, represented as a Python dictionary
- version (str) – The entry schema version
Returns: Return type: Raises: NotImplementedError
– If the supplied version is not supported
-
to_entry_dict
(did, version='1.0.0')¶ Converts the object to a dictionary suitable for recording on-chain.
Parameters: - did (str) – The DID with which this key is associated. Note that this can be different from the key controller.
- version (str) – The entry schema version
Returns: Dictionary with id, type, controller and an optional priorityRequirement fields. In addition to those, there is one extra field for the public key: if the selected signature type is SignatureType.RSA, then this field is called publicKeyPem, otherwise it is called publicKeyBase58.
Return type: dict
-