cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Skeleton.Output

Description

This module exposes outputs as they can be defined in a TxSkel with various utilities around them.

Synopsis

Documentation

data TxSkelOut where Source #

Transaction outputs. The Pays constructor is really general, and you'll probably want to use the receives smart constructor in most cases.

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.

txSkelOutValue :: TxSkelOut -> Value Source #

Returns the value contained 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

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