cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Skeleton

Description

This module provides the description of a transaction skeleton. We have our own representation of a transaction for many reasons. Here are some of them:

  • our transaction skeletons are typed (datums, validators, outputs...)
  • each transaction skeleton comes with its own set of generation options
  • our transaction skeleton is by default anchored in the latest Cardano era
  • each field in our transaction skeleton comes with a set of helpers and
  • smart constructor to ease the transaction creation
  • we can have default or automated behavior for the parts of the transactions that are less relevant to testing, such as collaterals or fees
Synopsis

Documentation

data TxSkel where Source #

A transaction skeleton. This is cooked-validators's variant of transaction bodies, eventually translated to Cardano TxBody.

Constructors

TxSkel 

Fields

Instances

Instances details
Show TxSkel Source # 
Instance details

Defined in Cooked.Skeleton

Eq TxSkel Source # 
Instance details

Defined in Cooked.Skeleton

Methods

(==) :: TxSkel -> TxSkel -> Bool #

(/=) :: TxSkel -> TxSkel -> Bool #

MonadBlockChainWithoutValidation m => MonadTweak (Tweak m) Source # 
Instance details

Defined in Cooked.Tweak.Common

txSkelLabelL :: Lens' TxSkel (Set TxLabel) Source #

A lens to set of get labels from a TxSkel

txSkelOptsL :: Lens' TxSkel TxOpts Source #

A lens to set of get options from a TxSkel

txSkelMintsL :: Lens' TxSkel TxSkelMints Source #

A lens to set of get the minted value of a TxSkel

txSkelValidityRangeL :: Lens' TxSkel SlotRange Source #

A lens to set of get the validity range of a TxSkel

txSkelProposalsL :: Lens' TxSkel [TxSkelProposal] Source #

A lens to set of get proposals from a TxSkel

txSkelSignersL :: Lens' TxSkel [Wallet] Source #

A lens to set of get signers from a TxSkel

txSkelInsL :: Lens' TxSkel (Map TxOutRef TxSkelRedeemer) Source #

A lens to set of get inputs from a TxSkel

txSkelInsReferenceL :: Lens' TxSkel (Set TxOutRef) Source #

A lens to set of get reference inputs from a TxSkel

txSkelOutsL :: Lens' TxSkel [TxSkelOut] Source #

A lens to set of get outputs from a TxSkel

txSkelWithdrawalsL :: Lens' TxSkel TxSkelWithdrawals Source #

A lens to set of get withdrawals from a TxSkel

txSkelTemplate :: TxSkel Source #

A convenience template of an empty transaction skeleton.

txSkelDataInOutputs :: TxSkel -> [(DatumHash, TxSkelOutDatum)] Source #

Returns all data on transaction outputs. This can contain duplicates, which is intended.

txSkelKnownTxOutRefs :: TxSkel -> [TxOutRef] Source #

All TxOutRefs known by a given transaction skeleton. This includes TxOutRef`s used as inputs of the skeleton and TxOutRefs used as reference inputs of the skeleton. This does not include additional possible TxOutRefs used for balancing and additional TxOutRefs used as collateral inputs, as they are not part of the skeleton.

txSkelWithdrawnValue :: TxSkel -> Value Source #

Returns the total value withdrawn in this TxSkel

txSkelWithdrawalsScripts :: TxSkel -> [Versioned Script] Source #

Returns all the scripts involved in withdrawals in this TxSkel

txSkelValueInOutputs :: TxSkel -> Value Source #

Returns the full value contained in the skeleton outputs

txSkelReferenceTxOutRefs :: TxSkel -> [TxOutRef] Source #

All TxOutRefs in reference inputs