| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Ledger
Synopsis
- data Ledger tx = Ledger {
- applyTransactions :: ChainSlot -> UTxOType tx -> [tx] -> Either (tx, ValidationError) (UTxOType tx)
- reapplyTransactions :: ChainSlot -> UTxOType tx -> [tx] -> Either (tx, ValidationError) (UTxOType tx)
- data ValidationResult
- newtype ValidationError = ValidationError {
- reason :: Text
Documentation
An abstract interface for a Ledger. Allows to define mock / simpler
implementation for testing as well as limiting feature-envy from the business
logic by forcing a closed interface.
Constructors
| Ledger | |
Fields
| |
data ValidationResult Source #
Either valid or an error which we get from the ledger-specs tx validation.
Constructors
| Valid | |
| Invalid ValidationError |
Instances
| Generic ValidationResult Source # | |
Defined in Hydra.Ledger Methods from :: ValidationResult -> Rep ValidationResult x Source # to :: Rep ValidationResult x -> ValidationResult Source # | |
| Show ValidationResult Source # | |
Defined in Hydra.Ledger | |
| Eq ValidationResult Source # | |
Defined in Hydra.Ledger Methods (==) :: ValidationResult -> ValidationResult -> Bool Source # (/=) :: ValidationResult -> ValidationResult -> Bool Source # | |
| type Rep ValidationResult Source # | |
Defined in Hydra.Ledger type Rep ValidationResult = D1 ('MetaData "ValidationResult" "Hydra.Ledger" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "Valid" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Invalid" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ValidationError))) | |
newtype ValidationError Source #
Constructors
| ValidationError | |
Fields
| |