| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Tx.Close
Contents
Synopsis
- type PointInTime = (SlotNo, UTCTime)
- closeTx :: ScriptRegistry -> VerificationKey PaymentKey -> HeadId -> SnapshotVersion -> ConfirmedSnapshot Tx -> SlotNo -> PointInTime -> OpenThreadOutput -> IncrementalAction -> Tx
- data ClosedThreadOutput = ClosedThreadOutput {
- closedThreadUTxO :: (TxIn, TxOut CtxUTxO)
- closedParties :: [Party]
- closedContestationDeadline :: POSIXTime
- closedContesters :: [PubKeyHash]
- data CloseObservation = CloseObservation {}
- observeCloseTx :: UTxO -> Tx -> Maybe CloseObservation
Construction
type PointInTime = (SlotNo, UTCTime) Source #
Arguments
| :: ScriptRegistry | Published Hydra scripts to reference. |
| -> VerificationKey PaymentKey | Party who's authorizing this transaction |
| -> HeadId | Head identifier |
| -> SnapshotVersion | Last known version of the open head. |
| -> ConfirmedSnapshot Tx | Snapshot with instructions how to close the head. |
| -> SlotNo | Lower validity slot number, usually a current or quite recent slot number. |
| -> PointInTime | Upper validity slot and UTC time to compute the contestation deadline time. |
| -> OpenThreadOutput | Everything needed to spend the Head state-machine output. |
| -> IncrementalAction | |
| -> Tx |
Create a transaction closing a head with either the initial snapshot or with a multi-signed confirmed snapshot.
Observation
data ClosedThreadOutput Source #
Constructors
| ClosedThreadOutput | |
Fields
| |
Instances
data CloseObservation Source #
Constructors
| CloseObservation | |
Fields | |
Instances
Arguments
| :: UTxO | A UTxO set to lookup tx inputs |
| -> Tx | |
| -> Maybe CloseObservation |
Identify a close tx by lookup up the input spending the Head output and decoding its redeemer.