| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Tx.Init
Contents
Synopsis
- initTx :: NetworkId -> PParams LedgerEra -> TxIn -> [OnChainId] -> HeadParameters -> Tx
- mkHeadOutput :: NetworkId -> PolicyId -> [OnChainId] -> TxOutDatum ctx -> TxOut ctx
- data InitObservation = InitObservation {}
- data NotAnInitReason
- observeInitTx :: Tx -> Either NotAnInitReason InitObservation
Construction
Arguments
| :: NetworkId | |
| -> PParams LedgerEra | Current protocol parameters, used to compute worst-case min-UTxO. |
| -> TxIn | Seed input. |
| -> [OnChainId] | Verification key hashes of all participants. |
| -> HeadParameters | |
| -> Tx |
Create the init transaction from some HeadParameters and a single TxIn
which will be used as unique parameter for minting NFTs.
mkHeadOutput :: NetworkId -> PolicyId -> [OnChainId] -> TxOutDatum ctx -> TxOut ctx Source #
Observation
data InitObservation Source #
Data which can be observed from an initTx.
Constructors
| InitObservation | |
Fields
| |
Instances
data NotAnInitReason Source #
Instances
observeInitTx :: Tx -> Either NotAnInitReason InitObservation Source #
Identify a init tx by checking the output value for holding tokens that are valid head tokens (checked by seed + policy).