MultiHostNameRelay
- class cometa.pool_params.multi_host_name_relay.MultiHostNameRelay(ptr)[source]
Bases:
objectRepresents a multi-host name relay for Cardano stake pools.
This relay type points to a DNS SRV record that can resolve to multiple IP addresses, facilitating load balancing and failover for stake pool relays.
- classmethod new(dns)[source]
Creates a new multi-host name relay.
- Parameters:
dns (str) – The DNS SRV hostname (e.g., “_cardano._tcp.example.com”).
- Returns:
A new MultiHostNameRelay instance.
- Raises:
CardanoError – If creation fails.
- Return type:
Example
>>> relay = MultiHostNameRelay.new("relay.example.com")
- classmethod from_cbor(reader)[source]
Deserializes a MultiHostNameRelay from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the relay data.
- Returns:
A new MultiHostNameRelay deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the relay to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property dns: str
Returns the DNS hostname.
- to_cip116_json(writer)[source]
Serializes this relay to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None