Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.Marlowe.Runtime.Transaction.BuildConstraints
Synopsis
- type ApplyResults v = (UTCTime, UTCTime, Maybe (Assets, Datum v), Inputs v)
- type MkRoleTokenMintingPolicy m = TxOutRef -> Map TokenName Integer -> m PlutusScript
- buildApplyInputsConstraints :: Monad m => (TransactionInput -> m (Maybe TransactionInput)) -> SystemStart -> EraHistory CardanoMode -> MarloweVersion v -> TransactionScriptOutput v -> SlotNo -> MarloweTransactionMetadata -> Maybe UTCTime -> Maybe UTCTime -> Inputs v -> ExceptT ApplyInputsError m (ApplyResults v, TxConstraints era v)
- buildCreateConstraints :: forall era v m. Monad m => MkRoleTokenMintingPolicy m -> ReferenceTxInsScriptsInlineDatumsSupportedInEra era -> MarloweVersion v -> WalletContext -> RoleTokensConfig -> MarloweTransactionMetadata -> Lovelace -> Contract v -> m (Either CreateError ((Datum v, Assets, PolicyId), TxConstraints era v))
- buildWithdrawConstraints :: forall m era v. Monad m => PayoutContext -> MarloweVersion v -> Set TxOutRef -> ExceptT WithdrawError m (Map TxOutRef (Payout v), TxConstraints era v)
Documentation
type ApplyResults v = (UTCTime, UTCTime, Maybe (Assets, Datum v), Inputs v) Source #
type MkRoleTokenMintingPolicy m = TxOutRef -> Map TokenName Integer -> m PlutusScript Source #
buildApplyInputsConstraints Source #
Arguments
:: Monad m | |
=> (TransactionInput -> m (Maybe TransactionInput)) | |
-> SystemStart | |
-> EraHistory CardanoMode | The era history for converting times to slots. |
-> MarloweVersion v | The Marlowe version to build the transaction for. |
-> TransactionScriptOutput v | The previous script output for the contract |
-> SlotNo | The current tip slot |
-> MarloweTransactionMetadata | Metadata to attach to the transaction |
-> Maybe UTCTime | The minimum bound of the validity interval (inclusive). |
-> Maybe UTCTime | The maximum bound of the validity interval (exclusive). If not specified, this is computed from the the timeouts in the contract. |
-> Inputs v | The inputs to apply to the contract. |
-> ExceptT ApplyInputsError m (ApplyResults v, TxConstraints era v) |
buildCreateConstraints Source #
Arguments
:: forall era v m. Monad m | |
=> MkRoleTokenMintingPolicy m | A validator creator for the role token minting policy. |
-> ReferenceTxInsScriptsInlineDatumsSupportedInEra era | The era in which the transaction is being built. Requires reference scripts. |
-> MarloweVersion v | The Marlowe version to build the transaction for. |
-> WalletContext | The wallet used to mint tokens. |
-> RoleTokensConfig | The initial distribution of the role tokens. |
-> MarloweTransactionMetadata | Metadata to add to the transaction. |
-> Lovelace | Min Lovelace value which should be used on the Marlowe output. |
-> Contract v | The contract being instantiated. |
-> m (Either CreateError ((Datum v, Assets, PolicyId), TxConstraints era v)) |
Creates a set of Tx constraints that are used to build a transaction that instantiates a contract.
buildWithdrawConstraints Source #
Arguments
:: forall m era v. Monad m | |
=> PayoutContext | The payout context for the current transaction. |
-> MarloweVersion v | The Marlowe version to build the transaction for. |
-> Set TxOutRef | The payouts to withdraw |
-> ExceptT WithdrawError m (Map TxOutRef (Payout v), TxConstraints era v) |
Creates a set of Tx constraints that are used to build a transaction that withdraws payments from a payout validator.