UnregisterDRepCert

class cometa.certificates.unregister_drep_cert.UnregisterDRepCert(ptr)[source]

Bases: object

Represents a DRep unregistration certificate.

This certificate is used when a Delegated Representative (DRep) wants to unregister and receive their deposit back.

__init__(ptr)[source]
Return type:

None

__enter__()[source]
Return type:

UnregisterDRepCert

__exit__(exc_type, exc_val, exc_tb)[source]
Return type:

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod new(credential, deposit)[source]

Creates a new DRep unregistration certificate.

Parameters:
  • credential (Credential) – The DRep credential to unregister.

  • deposit (int) – The deposit amount to be refunded (in lovelace).

Returns:

A new UnregisterDRepCert instance.

Raises:

CardanoError – If creation fails.

Return type:

UnregisterDRepCert

classmethod from_cbor(reader)[source]

Deserializes an UnregisterDRepCert from CBOR data.

Parameters:

reader (CborReader) – A CborReader positioned at the certificate data.

Returns:

A new UnregisterDRepCert deserialized from the CBOR data.

Raises:

CardanoError – If deserialization fails.

Return type:

UnregisterDRepCert

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 unregistered.

Returns:

The Credential for the DRep.

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