UnregistrationCert
- class cometa.certificates.unregistration_cert.UnregistrationCert(ptr)[source]
Bases:
objectRepresents an unregistration certificate (Conway era).
This certificate is used when a stakeholder no longer wants to participate in staking. It revokes the stake registration and the associated stake is no longer counted when calculating stake pool rewards.
Note
This replaces the deprecated StakeDeregistrationCert after the Conway era.
- classmethod new(credential, deposit)[source]
Creates a new unregistration certificate.
- Parameters:
credential (Credential) – The stake credential to unregister.
deposit (int) – The deposit amount to be refunded (in lovelace).
- Returns:
A new UnregistrationCert instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes an UnregistrationCert from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the certificate data.
- Returns:
A new UnregistrationCert 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 stake credential being unregistered.
- Returns:
The Credential associated with this unregistration.
- property deposit: int
The deposit amount to be refunded (in lovelace).
- Returns:
The deposit amount.
- 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