StakeVoteRegistrationDelegationCert
- class cometa.certificates.stake_vote_registration_delegation_cert.StakeVoteRegistrationDelegationCert(ptr)[source]
Bases:
objectRepresents a combined stake registration, stake delegation, and vote delegation certificate.
This certificate allows registering a stake credential, delegating it to a pool, and delegating voting power to a DRep, all in a single certificate.
- classmethod new(credential, deposit, drep, pool_key_hash)[source]
Creates a new stake vote registration and delegation certificate.
- Parameters:
credential (Credential) – The stake credential to register and delegate.
deposit (int) – The deposit amount in lovelace.
drep (DRep) – The DRep to delegate voting power to.
pool_key_hash (Blake2bHash) – The hash of the pool’s operator key to delegate stake to.
- Returns:
A new StakeVoteRegistrationDelegationCert instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a StakeVoteRegistrationDelegationCert from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the certificate data.
- Returns:
A new StakeVoteRegistrationDelegationCert 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 registered and delegated.
- Returns:
The Credential associated with this certificate.
- property deposit: int
The deposit amount in lovelace.
- Returns:
The deposit amount.
- property drep: DRep
The DRep receiving the delegated voting power.
- Returns:
The DRep 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