StakeRegistrationCert
- class cometa.certificates.stake_registration_cert.StakeRegistrationCert(ptr)[source]
Bases:
objectRepresents a stake registration certificate.
This certificate is used to register a staking key on the Cardano blockchain. It is part of the Shelley-era certificate types.
- classmethod new(credential)[source]
Creates a new stake registration certificate.
- Parameters:
credential (Credential) – The staking credential to register.
- Returns:
A new StakeRegistrationCert instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a StakeRegistrationCert from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the certificate data.
- Returns:
A new StakeRegistrationCert 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 staking credential being registered.
- Returns:
The Credential associated with this registration.
- 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