Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
The validator used to collect & open or abort a Head.
Synopsis
- data Commit = Commit {
- input :: TxOutRef
- preSerializedOutput :: BuiltinByteString
- serializeCommit :: (TxIn, TxOut CtxUTxO) -> Maybe Commit
- deserializeCommit :: Network -> Commit -> Maybe (TxIn, TxOut CtxUTxO)
- type DatumType = (Party, [Commit], CurrencySymbol)
- data CommitRedeemer
- type RedeemerType = CommitRedeemer
- datum :: DatumType -> Datum
- redeemer :: RedeemerType -> Redeemer
Documentation
A data type representing comitted outputs on-chain. Besides recording the
original TxOutRef
, it also stores a binary representation compatible
between on- and off-chain code to be hashed in the validators.
Commit | |
|
Instances
Show Commit Source # | |
Eq Commit Source # | |
Ord Commit Source # | |
Defined in Hydra.Contract.Commit | |
Eq Commit Source # | |
Defined in Hydra.Contract.Commit | |
FromData Commit Source # | |
Defined in Hydra.Contract.Commit fromBuiltinData :: BuiltinData -> Maybe Commit | |
ToData Commit Source # | |
Defined in Hydra.Contract.Commit toBuiltinData :: Commit -> BuiltinData | |
UnsafeFromData Commit Source # | |
Defined in Hydra.Contract.Commit unsafeFromBuiltinData :: BuiltinData -> Commit |
serializeCommit :: (TxIn, TxOut CtxUTxO) -> Maybe Commit Source #
Record an off-chain TxOut
as a Commit
on-chain.
NOTE: Depends on the Serialise
instance for Plutus' Data
.
deserializeCommit :: Network -> Commit -> Maybe (TxIn, TxOut CtxUTxO) Source #
Decode an on-chain SerializedTxOut
back into an off-chain TxOut
.
NOTE: Depends on the Serialise
instance for Plutus' Data
.
data CommitRedeemer Source #
Instances
FromData CommitRedeemer Source # | |
Defined in Hydra.Contract.Commit fromBuiltinData :: BuiltinData -> Maybe CommitRedeemer | |
ToData CommitRedeemer Source # | |
Defined in Hydra.Contract.Commit toBuiltinData :: CommitRedeemer -> BuiltinData | |
UnsafeFromData CommitRedeemer Source # | |
Defined in Hydra.Contract.Commit unsafeFromBuiltinData :: BuiltinData -> CommitRedeemer |
type RedeemerType = CommitRedeemer Source #
redeemer :: RedeemerType -> Redeemer Source #