GenesisKeyDelegationCert

class cometa.certificates.genesis_key_delegation_cert.GenesisKeyDelegationCert(ptr)[source]

Bases: object

Represents a genesis key delegation certificate.

This certificate is used in the Shelley era to delegate genesis keys. It is a legacy certificate type not used in later eras.

__init__(ptr)[source]
Return type:

None

__enter__()[source]
Return type:

GenesisKeyDelegationCert

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

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod new(genesis_hash, genesis_delegate_hash, vrf_key_hash)[source]

Creates a new genesis key delegation certificate.

Parameters:
  • genesis_hash (Blake2bHash) – The hash of the genesis key.

  • genesis_delegate_hash (Blake2bHash) – The hash of the genesis delegate key.

  • vrf_key_hash (Blake2bHash) – The hash of the VRF key.

Returns:

A new GenesisKeyDelegationCert instance.

Raises:

CardanoError – If creation fails.

Return type:

GenesisKeyDelegationCert

classmethod from_cbor(reader)[source]

Deserializes a GenesisKeyDelegationCert from CBOR data.

Parameters:

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

Returns:

A new GenesisKeyDelegationCert deserialized from the CBOR data.

Raises:

CardanoError – If deserialization fails.

Return type:

GenesisKeyDelegationCert

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 genesis_hash: Blake2bHash

The hash of the genesis key.

Returns:

The Blake2bHash of the genesis key.

property genesis_delegate_hash: Blake2bHash

The hash of the genesis delegate key.

Returns:

The Blake2bHash of the genesis delegate key.

property vrf_key_hash: Blake2bHash

The hash of the VRF key.

Returns:

The Blake2bHash of the VRF 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