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

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

Focusing on the labels of a TxSkel

txSkelOptsL :: Lens' TxSkel TxSkelOpts Source #

Focusing on the optics of a TxSkel

txSkelMintsL :: Lens' TxSkel TxSkelMints Source #

Focusing on the minted value of a TxSkel

txSkelValidityRangeL :: Lens' TxSkel SlotRange Source #

Focusing on the validity range of a TxSkel

txSkelProposalsL :: Lens' TxSkel [TxSkelProposal] Source #

Focusing on the proposals of a TxSkel

txSkelSignatoriesL :: Lens' TxSkel [TxSkelSignatory] Source #

Focusing on the signatories of a TxSkel

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

Focusing on the inputs of a TxSkel

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

Focusing on the reference inputs of a TxSkel

txSkelOutsL :: Lens' TxSkel [TxSkelOut] Source #

Focusing on the outputs of a TxSkel

txSkelWithdrawalsL :: Lens' TxSkel TxSkelWithdrawals Source #

Focusing on the withdrawals of a TxSkel

txSkelCertificatesL :: Lens' TxSkel [TxSkelCertificate] Source #

Focusing on the certificates of a TxSkel

txSkelTemplate :: TxSkel Source #

A lens to set or

A convenience template of an empty transaction skeleton.

txSkelKnownTxOutRefs :: TxSkel -> Set 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

txSkelWithdrawingScripts :: TxSkel -> [VScript] Source #

Returns all the scripts involved in withdrawals in this TxSkel

txSkelValueInOutputs :: TxSkel -> Value Source #

Returns the full value contained in the skeleton outputs

txSkelInsReferenceInRedeemers :: TxSkel -> Set TxOutRef Source #

All TxOutRefs in reference inputs from redeemers

txSkelProposingScripts :: TxSkel -> [VScript] Source #

Returns all the scripts involved in proposals in this TxSkel

txSkelMintingScripts :: TxSkel -> [VScript] Source #

Returns all the scripts involved in minting in this TxSkel

txSkelCertifyingScripts :: TxSkel -> [VScript] Source #

Returns all the scripts involved in certificates in this TxSkel