| 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
- TxSkelOut :: OwnerConstrs owner => {..} -> TxSkelOut
 
 - receives :: OwnerConstrs owner => owner -> Payable els -> TxSkelOut
 - txSkelOutValueL :: Lens' TxSkelOut Value
 - txSkelOutValueAutoAdjustL :: Lens' TxSkelOut Bool
 - txSkelOutDatumL :: Lens' TxSkelOut TxSkelOutDatum
 - txSkelOutReferenceScriptL :: Lens' TxSkelOut TxSkelOutReferenceScript
 - txSkelOutStakingCredentialL :: Lens' TxSkelOut (Maybe StakingCredential)
 - txSkelOutValidatorAT :: AffineTraversal' TxSkelOut (Versioned Validator)
 - class IsTxSkelOutAllowedOwner a where
- toPKHOrValidator :: a -> Either PubKeyHash (Versioned Validator)
 
 - type OwnerConstrs owner = (IsTxSkelOutAllowedOwner owner, Typeable owner, Show owner)
 - txSkelOutCredentialG :: Getter TxSkelOut Credential
 - txSkelOutAddressG :: Getter TxSkelOut Address
 - txSkelOutPKHashAT :: AffineTraversal' TxSkelOut PubKeyHash
 - txSkelOutTypedOwnerAT :: (OwnerConstrs a, OwnerConstrs b) => AffineTraversal TxSkelOut TxSkelOut a b
 - txSkelOutValidatorHashAF :: AffineFold TxSkelOut ValidatorHash
 - valueAssetClassAmountL :: ToMintingPolicyHash mp => mp -> TokenName -> Lens' Value Integer
 - lovelaceIntegerI :: Iso' Lovelace Integer
 - valueLovelaceL :: Lens' Value Lovelace
 - valueAssetClassAmountP :: ToMintingPolicyHash mp => mp -> TokenName -> Prism' Value Integer
 - valueLovelaceP :: Prism' Value Lovelace
 - ownerCredentialG :: IsTxSkelOutAllowedOwner owner => Getter owner Credential
 
Documentation
A rich output to be put into a TxSkel
Constructors
| TxSkelOut | |
Fields 
  | |
Instances
receives :: OwnerConstrs 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.
txSkelOutValueAutoAdjustL :: Lens' TxSkelOut Bool Source #
A lens to get or set if the value can be auto-adjusted if needed
txSkelOutDatumL :: Lens' TxSkelOut TxSkelOutDatum Source #
A lens to get or set the TxSkelOutDatum from a TxSkelOut
txSkelOutReferenceScriptL :: Lens' TxSkelOut TxSkelOutReferenceScript Source #
A lens to get or set the TxSkelOutReferenceScript from a TxSkelOut
txSkelOutStakingCredentialL :: Lens' TxSkelOut (Maybe StakingCredential) Source #
A lens to get or set the 'Maybe Api.StakingCredential' from a TxSkelOut
txSkelOutValidatorAT :: AffineTraversal' TxSkelOut (Versioned Validator) Source #
Returns the optional validator owning a given TxSkelOut
class IsTxSkelOutAllowedOwner a where Source #
A TxSkelOut can either be owned by a pubkeyhash or a versioned validator
Methods
toPKHOrValidator :: a -> Either PubKeyHash (Versioned Validator) Source #
Instances
type OwnerConstrs owner = (IsTxSkelOutAllowedOwner owner, Typeable owner, Show owner) Source #
Type constraints over the owner of a TxSkelOut
txSkelOutCredentialG :: Getter TxSkelOut Credential Source #
Returns the credential of this TxSkelOut
txSkelOutPKHashAT :: AffineTraversal' TxSkelOut PubKeyHash Source #
Returns the optional private key owning a given TxSkelOut
txSkelOutTypedOwnerAT :: (OwnerConstrs a, OwnerConstrs b) => AffineTraversal TxSkelOut TxSkelOut a b Source #
Attempts to retrieve or set a typed owner from this TxSkelOut
txSkelOutValidatorHashAF :: AffineFold TxSkelOut ValidatorHash Source #
Returns the optional validator hash owning a given TxSkelOut
valueAssetClassAmountL :: ToMintingPolicyHash mp => mp -> TokenName -> Lens' Value Integer Source #
A lens to get or set the amount of tokens of a certain AssetClass
 from a given Value. This removes the entry if the new amount is 0.
valueAssetClassAmountP :: ToMintingPolicyHash mp => mp -> TokenName -> Prism' Value Integer Source #
A prism to build a value from an asset class and amount, or retrieves the amount from this asset class if it is not zero
valueLovelaceP :: Prism' Value Lovelace Source #
An instance of valueAssetClassAmountP for Lovelace
ownerCredentialG :: IsTxSkelOutAllowedOwner owner => Getter owner Credential Source #
Retrieves the credential of a TxSkelOut allowed owner