| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Chain.Delegation.Validation.Interface
Contents
Synopsis
- data Environment = Environment {}
- data State = State {}
- activateDelegations ∷ SlotNumber → State → State
- delegates ∷ State → VerificationKey → VerificationKey → Bool
- delegationMap ∷ State → Map
- initialState ∷ MonadError Error m ⇒ Environment → GenesisDelegation → m State
- tickDelegation ∷ EpochNumber → SlotNumber → State → State
- updateDelegation ∷ MonadError Error m ⇒ Environment → State → [ACertificate ByteString] → m State
Blockchain Interface
data Environment Source #
Constructors
| Environment | |
Fields | |
Instances
State shared between the blockchain and the ledger
Constructors
| State | |
Fields | |
Instances
| FromCBOR State Source # | |||||
| ToCBOR State Source # | |||||
| DecCBOR State Source # | |||||
| EncCBOR State Source # | |||||
| NFData State Source # | |||||
| Generic State Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Interface Associated Types
| |||||
| Show State Source # | |||||
| Eq State Source # | |||||
| NoThunks State Source # | |||||
| type Rep State Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Interface type Rep State = D1 ('MetaData "State" "Cardano.Chain.Delegation.Validation.Interface" "cardano-ledger-byron-1.3.0.0-inplace" 'False) (C1 ('MetaCons "State" 'PrefixI 'True) (S1 ('MetaSel ('Just "schedulingState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 State) :*: S1 ('MetaSel ('Just "activationState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 State))) | |||||
activateDelegations ∷ SlotNumber → State → State Source #
Activate certificates up to this slot
delegates ∷ State → VerificationKey → VerificationKey → Bool Source #
Check whether a delegation is valid in the State
delegationMap ∷ State → Map Source #
initialState ∷ MonadError Error m ⇒ Environment → GenesisDelegation → m State Source #
The initial state maps each genesis key to itself and overrides this using certificates from the genesis block.
tickDelegation ∷ EpochNumber → SlotNumber → State → State Source #
Perform delegation update without adding certificates
updateDelegation ∷ MonadError Error m ⇒ Environment → State → [ACertificate ByteString] → m State Source #
Update the State with a list of new Certificates
This corresponds to the DELEG rule from the Byron ledger specification