Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ConwayTxCert era
- data ConwayTxCertUpgradeError
- data ConwayDelegCert
- data ConwayGovCert
- = ConwayRegDRep !(Credential 'DRepRole) !Coin !(StrictMaybe Anchor)
- | ConwayUnRegDRep !(Credential 'DRepRole) !Coin
- | ConwayUpdateDRep !(Credential 'DRepRole) !(StrictMaybe Anchor)
- | ConwayAuthCommitteeHotKey !(Credential 'ColdCommitteeRole) !(Credential 'HotCommitteeRole)
- | ConwayResignCommitteeColdKey !(Credential 'ColdCommitteeRole) !(StrictMaybe Anchor)
- data Delegatee
- = DelegStake !(KeyHash 'StakePool)
- | DelegVote !DRep
- | DelegStakeVote !(KeyHash 'StakePool) !DRep
- class ShelleyEraTxCert era ⇒ ConwayEraTxCert era where
- mkRegDepositTxCert ∷ StakeCredential → Coin → TxCert era
- getRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential, Coin)
- mkUnRegDepositTxCert ∷ StakeCredential → Coin → TxCert era
- getUnRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential, Coin)
- mkDelegTxCert ∷ StakeCredential → Delegatee → TxCert era
- getDelegTxCert ∷ TxCert era → Maybe (StakeCredential, Delegatee)
- mkRegDepositDelegTxCert ∷ StakeCredential → Delegatee → Coin → TxCert era
- getRegDepositDelegTxCert ∷ TxCert era → Maybe (StakeCredential, Delegatee, Coin)
- mkAuthCommitteeHotKeyTxCert ∷ Credential 'ColdCommitteeRole → Credential 'HotCommitteeRole → TxCert era
- getAuthCommitteeHotKeyTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole, Credential 'HotCommitteeRole)
- mkResignCommitteeColdTxCert ∷ Credential 'ColdCommitteeRole → StrictMaybe Anchor → TxCert era
- getResignCommitteeColdTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole, StrictMaybe Anchor)
- mkRegDRepTxCert ∷ Credential 'DRepRole → Coin → StrictMaybe Anchor → TxCert era
- getRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole, Coin, StrictMaybe Anchor)
- mkUnRegDRepTxCert ∷ Credential 'DRepRole → Coin → TxCert era
- getUnRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole, Coin)
- mkUpdateDRepTxCert ∷ Credential 'DRepRole → StrictMaybe Anchor → TxCert era
- getUpdateDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole, StrictMaybe Anchor)
- fromShelleyDelegCert ∷ ShelleyDelegCert → ConwayDelegCert
- toShelleyDelegCert ∷ ConwayDelegCert → Maybe ShelleyDelegCert
- getScriptWitnessConwayTxCert ∷ ConwayTxCert era → Maybe ScriptHash
- getVKeyWitnessConwayTxCert ∷ ConwayTxCert era → Maybe (KeyHash 'Witness)
- getDelegateeTxCert ∷ ConwayEraTxCert era ⇒ TxCert era → Maybe Delegatee
- getStakePoolDelegatee ∷ Delegatee → Maybe (KeyHash 'StakePool)
- getVoteDelegatee ∷ Delegatee → Maybe DRep
- conwayDRepDepositsTxCerts ∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → f (TxCert era) → Coin
- conwayDRepRefundsTxCerts ∷ (Foldable f, ConwayEraTxCert era) ⇒ (Credential 'DRepRole → Maybe Coin) → f (TxCert era) → Coin
- conwayTotalDepositsTxCerts ∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → (KeyHash 'StakePool → Bool) → f (TxCert era) → Coin
- conwayTotalRefundsTxCerts ∷ (EraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → (Credential 'Staking → Maybe Coin) → (Credential 'DRepRole → Maybe Coin) → f (TxCert era) → Coin
- pattern RegDepositTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Coin → TxCert era
- pattern UnRegDepositTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Coin → TxCert era
- pattern DelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Delegatee → TxCert era
- pattern RegDepositDelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Delegatee → Coin → TxCert era
- pattern AuthCommitteeHotKeyTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole → Credential 'HotCommitteeRole → TxCert era
- pattern ResignCommitteeColdTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole → StrictMaybe Anchor → TxCert era
- pattern RegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole → Coin → StrictMaybe Anchor → TxCert era
- pattern UnRegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole → Coin → TxCert era
- pattern UpdateDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole → StrictMaybe Anchor → TxCert era
Documentation
data ConwayTxCert era Source #
Instances
data ConwayTxCertUpgradeError Source #
Instances
data ConwayDelegCert Source #
Certificates for registration and delegation of stake to Pools and DReps. Comparing to previous eras, there is now ability to:
- Register and delegate with a single certificate:
ConwayRegDelegCert
- Ability to delegate to DReps with
DelegVote
andDelegStakeVote
- Ability to specify the deposit amount. Deposits during registration and
unregistration in Conway are optional, which will change in the future era. They are
optional only for the smooth transition from Babbage to Conway. Validity of deposits
is checked by the
CERT
rule.
ConwayRegCert !StakeCredential !(StrictMaybe Coin) | Register staking credential. Deposit, when present, must match the expected deposit
amount specified by |
ConwayUnRegCert !StakeCredential !(StrictMaybe Coin) | De-Register the staking credential. Deposit, if present, must match the amount that was left as a deposit upon stake credential registration. |
ConwayDelegCert !StakeCredential !Delegatee | Delegate staking credentials to a delegatee. Staking credential must already be registered. |
ConwayRegDelegCert !StakeCredential !Delegatee !Coin | This is a new type of certificate, which allows to register staking credential
and delegate within a single certificate. Deposit is required and must match the
expected deposit amount specified by |
Instances
data ConwayGovCert Source #
Instances
First type argument is the deposit
Instances
class ShelleyEraTxCert era ⇒ ConwayEraTxCert era where Source #
mkRegDepositTxCert ∷ StakeCredential → Coin → TxCert era Source #
getRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential, Coin) Source #
mkUnRegDepositTxCert ∷ StakeCredential → Coin → TxCert era Source #
getUnRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential, Coin) Source #
mkDelegTxCert ∷ StakeCredential → Delegatee → TxCert era Source #
getDelegTxCert ∷ TxCert era → Maybe (StakeCredential, Delegatee) Source #
mkRegDepositDelegTxCert ∷ StakeCredential → Delegatee → Coin → TxCert era Source #
getRegDepositDelegTxCert ∷ TxCert era → Maybe (StakeCredential, Delegatee, Coin) Source #
mkAuthCommitteeHotKeyTxCert ∷ Credential 'ColdCommitteeRole → Credential 'HotCommitteeRole → TxCert era Source #
getAuthCommitteeHotKeyTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole, Credential 'HotCommitteeRole) Source #
mkResignCommitteeColdTxCert ∷ Credential 'ColdCommitteeRole → StrictMaybe Anchor → TxCert era Source #
getResignCommitteeColdTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole, StrictMaybe Anchor) Source #
mkRegDRepTxCert ∷ Credential 'DRepRole → Coin → StrictMaybe Anchor → TxCert era Source #
getRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole, Coin, StrictMaybe Anchor) Source #
mkUnRegDRepTxCert ∷ Credential 'DRepRole → Coin → TxCert era Source #
getUnRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole, Coin) Source #
mkUpdateDRepTxCert ∷ Credential 'DRepRole → StrictMaybe Anchor → TxCert era Source #
getUpdateDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole, StrictMaybe Anchor) Source #
Instances
getVKeyWitnessConwayTxCert ∷ ConwayTxCert era → Maybe (KeyHash 'Witness) Source #
getDelegateeTxCert ∷ ConwayEraTxCert era ⇒ TxCert era → Maybe Delegatee Source #
conwayDRepDepositsTxCerts ∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → f (TxCert era) → Coin Source #
conwayDRepRefundsTxCerts ∷ (Foldable f, ConwayEraTxCert era) ⇒ (Credential 'DRepRole → Maybe Coin) → f (TxCert era) → Coin Source #
Compute the Refunds from a TxBody, given a function that computes a partial Coin for known Credentials.
conwayTotalDepositsTxCerts Source #
∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) | |
⇒ PParams era | |
→ (KeyHash 'StakePool → Bool) | Check whether a pool with a supplied PoolStakeId is already registered. |
→ f (TxCert era) | |
→ Coin |
Determine the total deposit amount needed from a TxBody. The block may (legitimately) contain multiple registration certificates for the same pool, where the first will be treated as a registration and any subsequent ones as re-registration. As such, we must only take a deposit for the first such registration. It is even possible for a single transaction to have multiple pool registration for the same pool, so as we process pool registrations, we must keep track of those that are already registered, so we do not add a Deposit for the same pool twice.
Note that this is not an issue for key registrations since subsequent registration certificates would be invalid.
conwayTotalRefundsTxCerts Source #
∷ (EraPParams era, Foldable f, ConwayEraTxCert era) | |
⇒ PParams era | |
→ (Credential 'Staking → Maybe Coin) | Function that can lookup current deposit, in case when the Staking credential is registered. |
→ (Credential 'DRepRole → Maybe Coin) | Function that can lookup current deposit, in case when the DRep credential is registered. |
→ f (TxCert era) | |
→ Coin |
Compute the key deregistration refunds in a transaction
pattern RegDepositTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Coin → TxCert era Source #
pattern UnRegDepositTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Coin → TxCert era Source #
pattern DelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Delegatee → TxCert era Source #
pattern RegDepositDelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential → Delegatee → Coin → TxCert era Source #
pattern AuthCommitteeHotKeyTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole → Credential 'HotCommitteeRole → TxCert era Source #
pattern ResignCommitteeColdTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole → StrictMaybe Anchor → TxCert era Source #
pattern RegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole → Coin → StrictMaybe Anchor → TxCert era Source #
pattern UnRegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole → Coin → TxCert era Source #
pattern UpdateDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole → StrictMaybe Anchor → TxCert era Source #