Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cooked.Skeleton.Output
Description
This module exposes outputs as they can be defined in a
TxSkel
with various utilities around them.
Synopsis
- data TxSkelOut where
- Pays :: (Show o, Typeable o, IsTxInfoOutput o, OwnerConstraints (OwnerType o), DatumType o ~ TxSkelOutDatum, ValueType o ~ TxSkelOutValue, ReferenceScriptConstraints (ReferenceScriptType o)) => o -> TxSkelOut
- receives :: (Show owner, Typeable owner, IsTxSkelOutAllowedOwner owner, ToCredential owner) => owner -> Payable els -> TxSkelOut
- txSkelOutValueL :: Lens' TxSkelOut TxSkelOutValue
- txSkelOutDatumL :: Lens' TxSkelOut TxSkelOutDatum
- txSkelOutValue :: TxSkelOut -> Value
- txSkelOutValidator :: TxSkelOut -> Maybe (Versioned Validator)
- txSkelOutOwnerTypeP :: forall ownerType. OwnerConstraints ownerType => Prism' TxSkelOut (ConcreteOutput ownerType TxSkelOutDatum TxSkelOutValue (Versioned Script))
- txSkelOutputDatumTypeAT :: (FromData a, Typeable a) => AffineTraversal' TxSkelOut a
- class IsTxSkelOutAllowedOwner a where
- toPKHOrValidator :: a -> Either PubKeyHash (Versioned Validator)
- txSkelOutReferenceScript :: TxSkelOut -> Maybe (Versioned Script)
- type OwnerConstraints owner = (IsTxSkelOutAllowedOwner owner, ToCredential owner, Typeable owner, Show owner)
- type ReferenceScriptConstraints refScript = (ToVersioned Script refScript, Show refScript, Typeable refScript)
Documentation
Transaction outputs. The Pays
constructor is really general, and you'll
probably want to use the receives
smart constructor in most cases.
Constructors
Pays :: (Show o, Typeable o, IsTxInfoOutput o, OwnerConstraints (OwnerType o), DatumType o ~ TxSkelOutDatum, ValueType o ~ TxSkelOutValue, ReferenceScriptConstraints (ReferenceScriptType o)) => o -> TxSkelOut |
Instances
Monoid DoubleSatDelta Source # | |
Defined in Cooked.Attack.DoubleSat Methods mappend :: DoubleSatDelta -> DoubleSatDelta -> DoubleSatDelta # mconcat :: [DoubleSatDelta] -> DoubleSatDelta # | |
Semigroup DoubleSatDelta Source # | |
Defined in Cooked.Attack.DoubleSat Methods (<>) :: DoubleSatDelta -> DoubleSatDelta -> DoubleSatDelta # sconcat :: NonEmpty DoubleSatDelta -> DoubleSatDelta # stimes :: Integral b => b -> DoubleSatDelta -> DoubleSatDelta # | |
Show TxSkelOut Source # | |
PrettyCooked TxSkelOut Source # | |
Defined in Cooked.Pretty.Cooked Methods prettyCooked :: TxSkelOut -> DocCooked Source # prettyCookedOpt :: PrettyCookedOpts -> TxSkelOut -> DocCooked Source # | |
Eq TxSkelOut Source # | |
receives :: (Show owner, Typeable owner, IsTxSkelOutAllowedOwner owner, ToCredential owner) => owner -> Payable els -> TxSkelOut Source #
Smart constructor to build a TxSkelOut
from an owner and payment. This
should be the main way of building outputs.
txSkelOutValueL :: Lens' TxSkelOut TxSkelOutValue Source #
A lens to get or set a TxSkelOutValue
in a TxSkelOut
txSkelOutDatumL :: Lens' TxSkelOut TxSkelOutDatum Source #
A lens to get or set a TxSkelOutDatum
in a TxSkelOut
txSkelOutValidator :: TxSkelOut -> Maybe (Versioned Validator) Source #
Returns the optional validator owning a given TxSkelOut
txSkelOutOwnerTypeP :: forall ownerType. OwnerConstraints ownerType => Prism' TxSkelOut (ConcreteOutput ownerType TxSkelOutDatum TxSkelOutValue (Versioned Script)) Source #
Decides if a transaction output has a certain owner and datum type.
txSkelOutputDatumTypeAT :: (FromData a, Typeable a) => AffineTraversal' TxSkelOut a Source #
A traversal over datums of type a
in a TxSkelOut
class IsTxSkelOutAllowedOwner a where Source #
Depicts the entities that are allowed to own a TxSkelOut
Methods
toPKHOrValidator :: a -> Either PubKeyHash (Versioned Validator) Source #
Instances
txSkelOutReferenceScript :: TxSkelOut -> Maybe (Versioned Script) Source #
Returns the optional reference script in a TxSkelOut
type OwnerConstraints owner = (IsTxSkelOutAllowedOwner owner, ToCredential owner, Typeable owner, Show owner) Source #
Type constraints over the owner of a TxSkelOut
type ReferenceScriptConstraints refScript = (ToVersioned Script refScript, Show refScript, Typeable refScript) Source #
Type constraints over the reference script in a TxSkelOut