StakeDelegationCert
- class cometa.certificates.stake_delegation_cert.StakeDelegationCert(ptr)[source]
Bases:
objectRepresents a stake delegation certificate.
This certificate is used to delegate stake from a staking key to a stake pool.
- classmethod new(credential, pool_key_hash)[source]
Creates a new stake delegation certificate.
- Parameters:
credential (Credential) – The staking credential to delegate.
pool_key_hash (Blake2bHash) – The hash of the pool’s operator key.
- Returns:
A new StakeDelegationCert instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a StakeDelegationCert from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the certificate data.
- Returns:
A new StakeDelegationCert 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 delegated.
- Returns:
The Credential associated with this delegation.
- property pool_key_hash: Blake2bHash
The hash of the pool’s operator key.
- Returns:
The Blake2bHash of the pool key.
- 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