RegisterDRepCert
- class cometa.certificates.register_drep_cert.RegisterDRepCert(ptr)[source]
Bases:
objectRepresents a DRep registration certificate.
This certificate is used to register a new Delegated Representative (DRep) who can participate in governance by voting on proposals.
- classmethod new(drep_credential, deposit, anchor=None)[source]
Creates a new DRep registration certificate.
- Parameters:
drep_credential (Credential) – The DRep credential to register.
deposit (int) – The deposit amount in lovelace.
anchor (Anchor | None) – Optional anchor with DRep metadata.
- Returns:
A new RegisterDRepCert instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a RegisterDRepCert from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the certificate data.
- Returns:
A new RegisterDRepCert 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 registered.
- Returns:
The Credential for the DRep.
- property deposit: int
The deposit amount in lovelace.
- Returns:
The deposit amount.
- 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