client.version_upgrader module¶
-
class
factom_did.client.version_upgrader.
DIDVersionUpgrader
(did, new_spec_version)¶ Bases:
object
Facilitates the creation of an DIDMethodVersionUpgrade entry for an existing DID.
-
did
¶ The DID object to update
Type: client.did.DID
-
new_spec_version
¶ The new version to upgrade to
Type: str
Raises: ValueError
– If the new version is not an upgrade on the current version-
export_entry_data
()¶ Constructs a signed DIDMethodVersionUpgrade entry ready for recording on-chain.
Returns: A dictionary with ExtIDs and content for the entry Return type: dict
-
record_on_chain
(factomd, walletd, ec_address, verbose=False)¶ Attempts to record the DIDMethodVersionUpgrade entry on-chain.
Parameters: - factomd (obj) – Factomd instance, instantiated from the Python factom-api package.
- walletd (obj) – Factom walletd instance, instantiated from the Python factom-api package.
- ec_address (str) – EC address used to pay for the chain & entry creation.
- verbose (bool, optional) – If true, display the contents of the entry that will be recorded on-chain.
Raises: RuntimeError
– If the entry cannot be recorded
-