TreasuryWithdrawalsAction
- class cometa.proposal_procedures.treasury_withdrawals_action.TreasuryWithdrawalsAction(ptr)[source]
Bases:
objectRepresents a treasury withdrawals governance action.
This action withdraws funds from the Cardano treasury to specified reward addresses. The guardrails policy hash can optionally be provided to ensure the withdrawal is validated against a guardrails script.
- classmethod new(withdrawals, policy_hash=None)[source]
Creates a new treasury withdrawals action.
- Parameters:
withdrawals (WithdrawalMap) – The withdrawal map specifying reward addresses and amounts.
policy_hash (Blake2bHash | None) – Optional guardrails policy hash.
- Returns:
A new TreasuryWithdrawalsAction instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a TreasuryWithdrawalsAction from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the action data.
- Returns:
A new TreasuryWithdrawalsAction deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the action to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property withdrawals: WithdrawalMap
The withdrawal map specifying reward addresses and amounts.
- Returns:
The WithdrawalMap.
- property policy_hash: Blake2bHash | None
The optional guardrails policy hash.
- Returns:
The Blake2bHash if present, None otherwise.
- to_cip116_json(writer)[source]
Serializes this object to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None