Safe Haskell | None |
---|---|
Language | Haskell98 |
Shelley.Spec.Ledger.Delegation.Certificates
Synopsis
- data DCert crypto
- = DCertDeleg !(DelegCert crypto)
- | DCertPool !(PoolCert crypto)
- | DCertGenesis !(GenesisDelegCert crypto)
- | DCertMir !(MIRCert crypto)
- data DelegCert crypto
- = RegKey !(StakeCredential crypto)
- | DeRegKey !(StakeCredential crypto)
- | Delegate !(Delegation crypto)
- data PoolCert crypto
- = RegPool !(PoolParams crypto)
- | RetirePool !(KeyHash 'StakePool crypto) !EpochNo
- data GenesisDelegCert crypto = GenesisDelegCert !(KeyHash 'Genesis crypto) !(KeyHash 'GenesisDelegate crypto) !(Hash crypto (VerKeyVRF crypto))
- data MIRCert crypto = MIRCert {
- mirPot :: MIRPot
- mirRewards :: Map (Credential 'Staking crypto) Coin
- newtype StakeCreds crypto = StakeCreds {
- unStakeCreds :: Map (Credential 'Staking crypto) SlotNo
- newtype PoolDistr crypto = PoolDistr {
- unPoolDistr :: Map (KeyHash 'StakePool crypto) (IndividualPoolStake crypto)
- data IndividualPoolStake crypto = IndividualPoolStake {
- individualPoolStake :: !Rational
- individualPoolStakeVrf :: !(Hash crypto (VerKeyVRF crypto))
- delegCWitness :: DelegCert crypto -> Credential 'Staking crypto
- poolCWitness :: PoolCert crypto -> Credential 'StakePool crypto
- genesisCWitness :: GenesisDelegCert crypto -> KeyHash 'Genesis crypto
- isRegKey :: DCert crypto -> Bool
- isDeRegKey :: DCert crypto -> Bool
- isDelegation :: DCert crypto -> Bool
- isGenesisDelegation :: DCert crypto -> Bool
- isRegPool :: DCert crypto -> Bool
- isRetirePool :: DCert crypto -> Bool
- isInstantaneousRewards :: DCert crypto -> Bool
- isReservesMIRCert :: DCert crypto -> Bool
- isTreasuryMIRCert :: DCert crypto -> Bool
- requiresVKeyWitness :: DCert crypto -> Bool
Documentation
A heavyweight certificate.
Constructors
DCertDeleg !(DelegCert crypto) | |
DCertPool !(PoolCert crypto) | |
DCertGenesis !(GenesisDelegCert crypto) | |
DCertMir !(MIRCert crypto) |
Instances
data DelegCert crypto Source #
Constructors
RegKey !(StakeCredential crypto) | A stake key registration certificate. |
DeRegKey !(StakeCredential crypto) | A stake key deregistration certificate. |
Delegate !(Delegation crypto) | A stake delegation certificate. |
Instances
Eq (DelegCert crypto) Source # | |
Show (DelegCert crypto) Source # | |
Generic (DelegCert crypto) Source # | |
NoThunks (DelegCert crypto) Source # | |
type Rep (DelegCert crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (DelegCert crypto) = D1 ('MetaData "DelegCert" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "RegKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StakeCredential crypto))) :+: (C1 ('MetaCons "DeRegKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StakeCredential crypto))) :+: C1 ('MetaCons "Delegate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Delegation crypto))))) |
Constructors
RegPool !(PoolParams crypto) | A stake pool registration certificate. |
RetirePool !(KeyHash 'StakePool crypto) !EpochNo | A stake pool retirement certificate. |
Instances
Eq (PoolCert crypto) Source # | |
Show (PoolCert crypto) Source # | |
Generic (PoolCert crypto) Source # | |
NoThunks (PoolCert crypto) Source # | |
type Rep (PoolCert crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (PoolCert crypto) = D1 ('MetaData "PoolCert" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "RegPool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PoolParams crypto))) :+: C1 ('MetaCons "RetirePool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool crypto)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo))) |
data GenesisDelegCert crypto Source #
Genesis key delegation certificate
Constructors
GenesisDelegCert !(KeyHash 'Genesis crypto) !(KeyHash 'GenesisDelegate crypto) !(Hash crypto (VerKeyVRF crypto)) |
Instances
Move instantaneous rewards certificate
Constructors
MIRCert | |
Fields
|
Instances
Eq (MIRCert crypto) Source # | |
Show (MIRCert crypto) Source # | |
Generic (MIRCert crypto) Source # | |
Crypto crypto => ToCBOR (MIRCert crypto) Source # | |
Crypto crypto => FromCBOR (MIRCert crypto) Source # | |
NoThunks (MIRCert crypto) Source # | |
type Rep (MIRCert crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (MIRCert crypto) = D1 ('MetaData "MIRCert" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "MIRCert" 'PrefixI 'True) (S1 ('MetaSel ('Just "mirPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MIRPot) :*: S1 ('MetaSel ('Just "mirRewards") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (Credential 'Staking crypto) Coin)))) |
newtype StakeCreds crypto Source #
Constructors
StakeCreds | |
Fields
|
Instances
newtype PoolDistr crypto Source #
Constructors
PoolDistr | |
Fields
|
Instances
data IndividualPoolStake crypto Source #
Constructors
IndividualPoolStake | |
Fields
|
Instances
delegCWitness :: DelegCert crypto -> Credential 'Staking crypto Source #
Determine the certificate author
poolCWitness :: PoolCert crypto -> Credential 'StakePool crypto Source #
genesisCWitness :: GenesisDelegCert crypto -> KeyHash 'Genesis crypto Source #
isDelegation :: DCert crypto -> Bool Source #
Check for Delegation
constructor
isGenesisDelegation :: DCert crypto -> Bool Source #
Check for GenesisDelegate
constructor
isRetirePool :: DCert crypto -> Bool Source #
Check for RetirePool
constructor
isInstantaneousRewards :: DCert crypto -> Bool Source #
isReservesMIRCert :: DCert crypto -> Bool Source #
isTreasuryMIRCert :: DCert crypto -> Bool Source #
requiresVKeyWitness :: DCert crypto -> Bool Source #
Returns True for delegation certificates that require at least
one witness, and False otherwise. It is mainly used to ensure
that calling a variant of cwitness
is safe.