Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- module Cooked.Skeleton.Withdrawal
- module Cooked.Skeleton.Value
- module Cooked.Skeleton.Redeemer
- module Cooked.Skeleton.Proposal
- module Cooked.Skeleton.Payable
- module Cooked.Skeleton.Output
- module Cooked.Skeleton.Option
- module Cooked.Skeleton.Mint
- module Cooked.Skeleton.Label
- module Cooked.Skeleton.Datum
- data TxSkel where
- txSkelLabelL :: Lens' TxSkel (Set TxLabel)
- txSkelOptsL :: Lens' TxSkel TxOpts
- txSkelMintsL :: Lens' TxSkel TxSkelMints
- txSkelValidityRangeL :: Lens' TxSkel SlotRange
- txSkelProposalsL :: Lens' TxSkel [TxSkelProposal]
- txSkelSignersL :: Lens' TxSkel [Wallet]
- txSkelInsL :: Lens' TxSkel (Map TxOutRef TxSkelRedeemer)
- txSkelInsReferenceL :: Lens' TxSkel (Set TxOutRef)
- txSkelOutsL :: Lens' TxSkel [TxSkelOut]
- txSkelWithdrawalsL :: Lens' TxSkel TxSkelWithdrawals
- txSkelTemplate :: TxSkel
- txSkelDataInOutputs :: TxSkel -> [(DatumHash, TxSkelOutDatum)]
- txSkelKnownTxOutRefs :: TxSkel -> [TxOutRef]
- txSkelWithdrawnValue :: TxSkel -> Value
- txSkelWithdrawalsScripts :: TxSkel -> [Versioned Script]
- txSkelValueInOutputs :: TxSkel -> Value
- txSkelReferenceTxOutRefs :: TxSkel -> [TxOutRef]
Documentation
module Cooked.Skeleton.Withdrawal
module Cooked.Skeleton.Value
module Cooked.Skeleton.Redeemer
module Cooked.Skeleton.Proposal
module Cooked.Skeleton.Payable
module Cooked.Skeleton.Output
module Cooked.Skeleton.Option
module Cooked.Skeleton.Mint
module Cooked.Skeleton.Label
module Cooked.Skeleton.Datum
A transaction skeleton. This is cooked-validators's variant of transaction
bodies, eventually translated to Cardano TxBody
.
Constructors
TxSkel | |
Fields
|
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
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
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 TxOutRef
s known by a given transaction skeleton. This includes
TxOutRef`s used as inputs of the skeleton and TxOutRef
s used as reference
inputs of the skeleton. This does not include additional possible
TxOutRef
s used for balancing and additional TxOutRef
s used as collateral
inputs, as they are not part of the skeleton.
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