Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ConwayTxCert era
- = ConwayTxCertDeleg !(ConwayDelegCert (EraCrypto era))
- | ConwayTxCertPool !(PoolCert (EraCrypto era))
- | ConwayTxCertGov !(ConwayGovCert (EraCrypto era))
- data ConwayTxCertUpgradeError
- data ConwayDelegCert c
- = ConwayRegCert !(StakeCredential c) !(StrictMaybe Coin)
- | ConwayUnRegCert !(StakeCredential c) !(StrictMaybe Coin)
- | ConwayDelegCert !(StakeCredential c) !(Delegatee c)
- | ConwayRegDelegCert !(StakeCredential c) !(Delegatee c) !Coin
- data ConwayGovCert c
- = ConwayRegDRep !(Credential 'DRepRole c) !Coin !(StrictMaybe (Anchor c))
- | ConwayUnRegDRep !(Credential 'DRepRole c) !Coin
- | ConwayUpdateDRep !(Credential 'DRepRole c) !(StrictMaybe (Anchor c))
- | ConwayAuthCommitteeHotKey !(Credential 'ColdCommitteeRole c) !(Credential 'HotCommitteeRole c)
- | ConwayResignCommitteeColdKey !(Credential 'ColdCommitteeRole c) !(StrictMaybe (Anchor c))
- data Delegatee c
- = DelegStake !(KeyHash 'StakePool c)
- | DelegVote !(DRep c)
- | DelegStakeVote !(KeyHash 'StakePool c) !(DRep c)
- class ShelleyEraTxCert era ⇒ ConwayEraTxCert era where
- mkRegDepositTxCert ∷ StakeCredential (EraCrypto era) → Coin → TxCert era
- getRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Coin)
- mkUnRegDepositTxCert ∷ StakeCredential (EraCrypto era) → Coin → TxCert era
- getUnRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Coin)
- mkDelegTxCert ∷ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → TxCert era
- getDelegTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Delegatee (EraCrypto era))
- mkRegDepositDelegTxCert ∷ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → Coin → TxCert era
- getRegDepositDelegTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Delegatee (EraCrypto era), Coin)
- mkAuthCommitteeHotKeyTxCert ∷ Credential 'ColdCommitteeRole (EraCrypto era) → Credential 'HotCommitteeRole (EraCrypto era) → TxCert era
- getAuthCommitteeHotKeyTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole (EraCrypto era), Credential 'HotCommitteeRole (EraCrypto era))
- mkResignCommitteeColdTxCert ∷ Credential 'ColdCommitteeRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era
- getResignCommitteeColdTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole (EraCrypto era), StrictMaybe (Anchor (EraCrypto era)))
- mkRegDRepTxCert ∷ Credential 'DRepRole (EraCrypto era) → Coin → StrictMaybe (Anchor (EraCrypto era)) → TxCert era
- getRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole (EraCrypto era), Coin, StrictMaybe (Anchor (EraCrypto era)))
- mkUnRegDRepTxCert ∷ Credential 'DRepRole (EraCrypto era) → Coin → TxCert era
- getUnRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole (EraCrypto era), Coin)
- mkUpdateDRepTxCert ∷ Credential 'DRepRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era
- getUpdateDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole (EraCrypto era), StrictMaybe (Anchor (EraCrypto era)))
- fromShelleyDelegCert ∷ ShelleyDelegCert c → ConwayDelegCert c
- toShelleyDelegCert ∷ ConwayDelegCert c → Maybe (ShelleyDelegCert c)
- getScriptWitnessConwayTxCert ∷ ConwayTxCert era → Maybe (ScriptHash (EraCrypto era))
- getVKeyWitnessConwayTxCert ∷ ConwayTxCert era → Maybe (KeyHash 'Witness (EraCrypto era))
- getDelegateeTxCert ∷ ConwayEraTxCert era ⇒ TxCert era → Maybe (Delegatee (EraCrypto era))
- getStakePoolDelegatee ∷ Delegatee c → Maybe (KeyHash 'StakePool c)
- getVoteDelegatee ∷ Delegatee c → Maybe (DRep c)
- conwayDRepDepositsTxCerts ∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → f (TxCert era) → Coin
- conwayDRepRefundsTxCerts ∷ (Foldable f, ConwayEraTxCert era) ⇒ (Credential 'DRepRole (EraCrypto era) → Maybe Coin) → f (TxCert era) → Coin
- conwayTotalDepositsTxCerts ∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → (KeyHash 'StakePool (EraCrypto era) → Bool) → f (TxCert era) → Coin
- conwayTotalRefundsTxCerts ∷ (EraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → (Credential 'Staking (EraCrypto era) → Maybe Coin) → (Credential 'DRepRole (EraCrypto era) → Maybe Coin) → f (TxCert era) → Coin
- pattern RegDepositTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential (EraCrypto era) → Coin → TxCert era
- pattern UnRegDepositTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential (EraCrypto era) → Coin → TxCert era
- pattern DelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → TxCert era
- pattern RegDepositDelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → Coin → TxCert era
- pattern AuthCommitteeHotKeyTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → Credential 'HotCommitteeRole (EraCrypto era) → TxCert era
- pattern ResignCommitteeColdTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era
- pattern RegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole (EraCrypto era) → Coin → StrictMaybe (Anchor (EraCrypto era)) → TxCert era
- pattern UnRegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole (EraCrypto era) → Coin → TxCert era
- pattern UpdateDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era
Documentation
data ConwayTxCert era Source #
ConwayTxCertDeleg !(ConwayDelegCert (EraCrypto era)) | |
ConwayTxCertPool !(PoolCert (EraCrypto era)) | |
ConwayTxCertGov !(ConwayGovCert (EraCrypto era)) |
Instances
data ConwayTxCertUpgradeError Source #
Instances
data ConwayDelegCert c 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 c) !(StrictMaybe Coin) | Register staking credential. Deposit, when present, must match the expected deposit
amount specified by |
ConwayUnRegCert !(StakeCredential c) !(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 c) !(Delegatee c) | Delegate staking credentials to a delegatee. Staking credential must already be registered. |
ConwayRegDelegCert !(StakeCredential c) !(Delegatee c) !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 c Source #
ConwayRegDRep !(Credential 'DRepRole c) !Coin !(StrictMaybe (Anchor c)) | |
ConwayUnRegDRep !(Credential 'DRepRole c) !Coin | |
ConwayUpdateDRep !(Credential 'DRepRole c) !(StrictMaybe (Anchor c)) | |
ConwayAuthCommitteeHotKey !(Credential 'ColdCommitteeRole c) !(Credential 'HotCommitteeRole c) | |
ConwayResignCommitteeColdKey !(Credential 'ColdCommitteeRole c) !(StrictMaybe (Anchor c)) |
Instances
First type argument is the deposit
DelegStake !(KeyHash 'StakePool c) | |
DelegVote !(DRep c) | |
DelegStakeVote !(KeyHash 'StakePool c) !(DRep c) |
Instances
class ShelleyEraTxCert era ⇒ ConwayEraTxCert era where Source #
mkRegDepositTxCert ∷ StakeCredential (EraCrypto era) → Coin → TxCert era Source #
getRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Coin) Source #
mkUnRegDepositTxCert ∷ StakeCredential (EraCrypto era) → Coin → TxCert era Source #
getUnRegDepositTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Coin) Source #
mkDelegTxCert ∷ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → TxCert era Source #
getDelegTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Delegatee (EraCrypto era)) Source #
mkRegDepositDelegTxCert ∷ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → Coin → TxCert era Source #
getRegDepositDelegTxCert ∷ TxCert era → Maybe (StakeCredential (EraCrypto era), Delegatee (EraCrypto era), Coin) Source #
mkAuthCommitteeHotKeyTxCert ∷ Credential 'ColdCommitteeRole (EraCrypto era) → Credential 'HotCommitteeRole (EraCrypto era) → TxCert era Source #
getAuthCommitteeHotKeyTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole (EraCrypto era), Credential 'HotCommitteeRole (EraCrypto era)) Source #
mkResignCommitteeColdTxCert ∷ Credential 'ColdCommitteeRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #
getResignCommitteeColdTxCert ∷ TxCert era → Maybe (Credential 'ColdCommitteeRole (EraCrypto era), StrictMaybe (Anchor (EraCrypto era))) Source #
mkRegDRepTxCert ∷ Credential 'DRepRole (EraCrypto era) → Coin → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #
getRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole (EraCrypto era), Coin, StrictMaybe (Anchor (EraCrypto era))) Source #
mkUnRegDRepTxCert ∷ Credential 'DRepRole (EraCrypto era) → Coin → TxCert era Source #
getUnRegDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole (EraCrypto era), Coin) Source #
mkUpdateDRepTxCert ∷ Credential 'DRepRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #
getUpdateDRepTxCert ∷ TxCert era → Maybe (Credential 'DRepRole (EraCrypto era), StrictMaybe (Anchor (EraCrypto era))) Source #
Instances
getScriptWitnessConwayTxCert ∷ ConwayTxCert era → Maybe (ScriptHash (EraCrypto era)) Source #
getVKeyWitnessConwayTxCert ∷ ConwayTxCert era → Maybe (KeyHash 'Witness (EraCrypto era)) Source #
getDelegateeTxCert ∷ ConwayEraTxCert era ⇒ TxCert era → Maybe (Delegatee (EraCrypto era)) Source #
conwayDRepDepositsTxCerts ∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) ⇒ PParams era → f (TxCert era) → Coin Source #
conwayDRepRefundsTxCerts ∷ (Foldable f, ConwayEraTxCert era) ⇒ (Credential 'DRepRole (EraCrypto era) → 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 (EraCrypto era) → 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 (EraCrypto era) → Maybe Coin) | Function that can lookup current deposit, in case when the Staking credential is registered. |
→ (Credential 'DRepRole (EraCrypto era) → 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 (EraCrypto era) → Coin → TxCert era Source #
pattern UnRegDepositTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential (EraCrypto era) → Coin → TxCert era Source #
pattern DelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → TxCert era Source #
pattern RegDepositDelegTxCert ∷ ConwayEraTxCert era ⇒ StakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → Coin → TxCert era Source #
pattern AuthCommitteeHotKeyTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → Credential 'HotCommitteeRole (EraCrypto era) → TxCert era Source #
pattern ResignCommitteeColdTxCert ∷ ConwayEraTxCert era ⇒ Credential 'ColdCommitteeRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #
pattern RegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole (EraCrypto era) → Coin → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #
pattern UnRegDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole (EraCrypto era) → Coin → TxCert era Source #
pattern UpdateDRepTxCert ∷ ConwayEraTxCert era ⇒ Credential 'DRepRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #