cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Tweak.Signatories

Description

This module defines Tweaks revolving around the signatories of a transaction. They assume but do not ensure that the list of signatories is free of duplicates.

Synopsis

Documentation

getSignatoriesTweak :: MonadTweak m => m [TxSkelSignatory] Source #

Returns the current list of signatories

modifySignatoriesTweak :: MonadTweak m => ([TxSkelSignatory] -> [TxSkelSignatory]) -> m [TxSkelSignatory] Source #

Apply a function to the list of signatories and return the old ones

setSignatoriesTweak :: MonadTweak m => [TxSkelSignatory] -> m [TxSkelSignatory] Source #

Change the current signatories and return the old ones

signatoriesSatisfyTweak :: MonadTweak m => ([TxSkelSignatory] -> Bool) -> m Bool Source #

Check if the signatories satisfy a certain predicate

isSignatoryTweak :: MonadTweak m => TxSkelSignatory -> m Bool Source #

Check if a signatory signs a transaction

hasSignatoriesTweak :: MonadTweak m => m Bool Source #

Check if the transaction has at least a signatory

addFirstSignatoryTweak :: MonadTweak m => TxSkelSignatory -> m [TxSkelSignatory] Source #

Add a signatory to the transaction, at the head of the list of signatories, and return the old list of signatories

addSignatoriesTweak :: MonadTweak m => [TxSkelSignatory] -> m [TxSkelSignatory] Source #

Add signatories at the end of the list of signatories, and return the old list of signatories

addLastSignatoryTweak :: MonadTweak m => TxSkelSignatory -> m [TxSkelSignatory] Source #

Add a signatory to the transaction, at the end of the list of signatories, and return the old list of signatories

removeSignatoriesTweak :: MonadTweak m => [TxSkelSignatory] -> m [TxSkelSignatory] Source #

Remove signatories from the transaction and return the old list of signatories

removeSignatoryTweak :: MonadTweak m => TxSkelSignatory -> m [TxSkelSignatory] Source #

Remove a signatory from the transaction and return the old list of signatories

replaceFirstSignatoryTweak :: MonadTweak m => TxSkelSignatory -> m [TxSkelSignatory] Source #

Changes the first signatory (adds it if there are no signatories) and return the old list of signatories.