hydra-plutus-0.20.0: Hydra Plutus Contracts
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Contract.Commit

Description

The validator used to collect & open or abort a Head.

Synopsis

Documentation

data Commit Source #

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.

Constructors

Commit 

Fields

Instances

Instances details
Show Commit Source # 
Instance details

Defined in Hydra.Contract.Commit

Eq Commit Source # 
Instance details

Defined in Hydra.Contract.Commit

Ord Commit Source # 
Instance details

Defined in Hydra.Contract.Commit

Eq Commit Source # 
Instance details

Defined in Hydra.Contract.Commit

Methods

(==) :: Commit -> Commit -> Bool

FromData Commit Source # 
Instance details

Defined in Hydra.Contract.Commit

Methods

fromBuiltinData :: BuiltinData -> Maybe Commit

ToData Commit Source # 
Instance details

Defined in Hydra.Contract.Commit

Methods

toBuiltinData :: Commit -> BuiltinData

UnsafeFromData Commit Source # 
Instance details

Defined in Hydra.Contract.Commit

Methods

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.

type DatumType = (Party, [Commit], CurrencySymbol) Source #

data CommitRedeemer Source #

Constructors

ViaCollectCom 
ViaAbort 

Instances

Instances details
FromData CommitRedeemer Source # 
Instance details

Defined in Hydra.Contract.Commit

Methods

fromBuiltinData :: BuiltinData -> Maybe CommitRedeemer

ToData CommitRedeemer Source # 
Instance details

Defined in Hydra.Contract.Commit

Methods

toBuiltinData :: CommitRedeemer -> BuiltinData

UnsafeFromData CommitRedeemer Source # 
Instance details

Defined in Hydra.Contract.Commit

Methods

unsafeFromBuiltinData :: BuiltinData -> CommitRedeemer

datum :: DatumType -> Datum Source #

redeemer :: RedeemerType -> Redeemer Source #