StakeVoteDelegationCert

class cometa.certificates.stake_vote_delegation_cert.StakeVoteDelegationCert(ptr)[source]

Bases: object

Represents a combined stake and vote delegation certificate.

This certificate allows delegating both stake (to a pool) and voting power (to a DRep) in a single certificate.

__init__(ptr)[source]
Return type:

None

__enter__()[source]
Return type:

StakeVoteDelegationCert

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

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod new(credential, pool_key_hash, drep)[source]

Creates a new stake and vote delegation certificate.

Parameters:
  • credential (Credential) – The stake credential delegating stake and voting power.

  • pool_key_hash (Blake2bHash) – The hash of the pool’s operator key to delegate stake to.

  • drep (DRep) – The DRep to delegate voting power to.

Returns:

A new StakeVoteDelegationCert instance.

Raises:

CardanoError – If creation fails.

Return type:

StakeVoteDelegationCert

classmethod from_cbor(reader)[source]

Deserializes a StakeVoteDelegationCert from CBOR data.

Parameters:

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

Returns:

A new StakeVoteDelegationCert deserialized from the CBOR data.

Raises:

CardanoError – If deserialization fails.

Return type:

StakeVoteDelegationCert

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 delegating stake and voting power.

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.

property drep: DRep

The DRep receiving the delegated voting power.

Returns:

The DRep associated with this delegation.

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