UpdateDRepCert
- class cometa.certificates.update_drep_cert.UpdateDRepCert(ptr)[source]
Bases:
objectRepresents a DRep update certificate.
This certificate is used when a Delegated Representative (DRep) wants to update their metadata anchor.
- classmethod new(credential, anchor=None)[source]
Creates a new DRep update certificate.
- Parameters:
credential (Credential) – The DRep credential to update.
anchor (Anchor | None) – Optional new anchor with DRep metadata.
- Returns:
A new UpdateDRepCert instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes an UpdateDRepCert from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the certificate data.
- Returns:
A new UpdateDRepCert deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the certificate to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property credential: Credential
The DRep credential being updated.
- Returns:
The Credential for the DRep.
- property anchor: Anchor | None
The optional anchor with DRep metadata.
- Returns:
The Anchor if present, None otherwise.
- to_cip116_json(writer)[source]
Serializes this certificate to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None