PoolOwners
- class cometa.pool_params.pool_owners.PoolOwners(ptr)[source]
Bases:
objectRepresents a set of stake pool owners.
Pool owners are identified by their Ed25519 key hashes (28 bytes). This class provides a set-like interface for managing pool owner key hashes.
- __getitem__(index: int) Blake2bHash[source]
- __getitem__(index: slice) List[Blake2bHash]
- __iter__()[source]
- Return type:
Iterator[Blake2bHash]
- classmethod new()[source]
Creates a new empty PoolOwners set.
- Returns:
A new empty PoolOwners instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a PoolOwners set from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the pool owners data.
- Returns:
A new PoolOwners deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the pool owners set to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- add(owner)[source]
Adds an owner key hash to the set.
- Parameters:
owner (Blake2bHash) – The owner’s key hash (28-byte Blake2b hash).
- Raises:
CardanoError – If adding fails.
- Return type:
None
- append(owner)[source]
Appends an owner key hash to the set (alias for add).
- Parameters:
owner (Blake2bHash) – The owner’s key hash (28-byte Blake2b hash).
- Raises:
CardanoError – If appending fails.
- Return type:
None
- extend(owners)[source]
Extends the set with owners from another set or list.
- Parameters:
owners (PoolOwners | List[Blake2bHash]) – Another PoolOwners set or a list of Blake2bHash objects.
- Raises:
CardanoError – If extending fails.
- Return type:
None
- to_cip116_json(writer)[source]
Serializes this pool owners set to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None