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 #

A rich output to be put into a TxSkel

Instances

Instances details
Monoid DoubleSatDelta Source # 
Instance details

Defined in Cooked.Attack.DoubleSat

Semigroup DoubleSatDelta Source # 
Instance details

Defined in Cooked.Attack.DoubleSat

Show TxSkelOut Source # 
Instance details

Defined in Cooked.Skeleton.Output

PrettyCooked TxSkelOut Source # 
Instance details

Defined in Cooked.Pretty.Skeleton

PrettyCookedList TxSkelOut Source # 
Instance details

Defined in Cooked.Pretty.Skeleton

Eq TxSkelOut Source # 
Instance details

Defined in Cooked.Skeleton.Output

ToAddress TxSkelOut Source # 
Instance details

Defined in Cooked.Skeleton.Output

ToCredential TxSkelOut Source # 
Instance details

Defined in Cooked.Skeleton.Output

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.

txSkelOutValueL :: Lens' TxSkelOut Value Source #

A lens to get or set the Value from a TxSkelOut

txSkelOutValueAutoAdjustL :: Lens' TxSkelOut Bool Source #

A lens to get or set if the value can be auto-adjusted if needed

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

type OwnerConstrs owner = (IsTxSkelOutAllowedOwner owner, Typeable owner, Show owner) Source #

Type constraints over the owner of a 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.

lovelaceIntegerI :: Iso' Lovelace Integer Source #

Isomorphism between Lovelace and integers

valueLovelaceL :: Lens' Value Lovelace Source #

Focus the Lovelace part in a value.

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

ownerCredentialG :: IsTxSkelOutAllowedOwner owner => Getter owner Credential Source #

Retrieves the credential of a TxSkelOut allowed owner