cardano-ledger-shelley-ma-0.1.0.0: Shelley ledger with multiasset and time lock support.
Safe Haskell None
Language Haskell2010

Cardano.Ledger.ShelleyMA.Timelocks

Synopsis

Documentation

data Timelock crypto where Source #

Bundled Patterns

pattern RequireSignature :: Crypto crypto => KeyHash ' Witness crypto -> Timelock crypto
pattern RequireAllOf :: Crypto crypto => StrictSeq ( Timelock crypto) -> Timelock crypto
pattern RequireAnyOf :: Crypto crypto => StrictSeq ( Timelock crypto) -> Timelock crypto
pattern RequireMOf :: Crypto crypto => Int -> StrictSeq ( Timelock crypto) -> Timelock crypto
pattern RequireTimeExpire :: Crypto crypto => SlotNo -> Timelock crypto
pattern RequireTimeStart :: Crypto crypto => SlotNo -> Timelock crypto

Instances

Instances details
Eq ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Ord ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Show ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Generic ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Associated Types

type Rep ( Timelock crypto) :: Type -> Type Source #

NFData ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Methods

rnf :: Timelock crypto -> () Source #

Typeable crypto => ToCBOR ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Crypto crypto => FromCBOR ( Annotator ( Timelock crypto)) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

SafeToHash ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Typeable crypto => NoThunks ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

type Rep ( Timelock crypto) Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

type Rep ( Timelock crypto)

pattern TimelockConstr :: MemoBytes (TimelockRaw crypto) -> Timelock crypto Source #

inInterval :: SlotNo -> ValidityInterval -> Bool Source #

Test if a slot is in the Validity interval. Recall that a ValidityInterval is a half Open interval, that is why we use (slot < top)

data ValidityInterval Source #

ValidityInterval is a half open interval. Closed on the bottom, Open on the top. A SNothing on the bottom is negative infinity, and a SNothing on the top is positive infinity

Instances

Instances details
Eq ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Ord ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Show ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Generic ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

NFData ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

ToCBOR ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

FromCBOR ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

NoThunks ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

HasField "vldt" ( TxBody era) ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.TxBody

type Rep ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

type Rep ValidityInterval = D1 (' MetaData "ValidityInterval" "Cardano.Ledger.ShelleyMA.Timelocks" "cardano-ledger-shelley-ma-0.1.0.0-IyXhkyY7R1xGIgXdNlolP6" ' False ) ( C1 (' MetaCons "ValidityInterval" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "invalidBefore") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( StrictMaybe SlotNo )) :*: S1 (' MetaSel (' Just "invalidHereafter") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( StrictMaybe SlotNo ))))