Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Hydra.Tx.Init
Contents
Synopsis
- initTx :: NetworkId -> TxIn -> [OnChainId] -> HeadParameters -> Tx
- mkHeadOutput :: NetworkId -> PolicyId -> TxOutDatum ctx -> TxOut ctx
- mkHeadOutputInitial :: NetworkId -> TxIn -> HeadParameters -> TxOut CtxTx
- mkInitialOutput :: NetworkId -> TxIn -> OnChainId -> TxOut CtxTx
- data InitObservation = InitObservation {
- initialThreadUTxO :: (TxIn, TxOut CtxUTxO)
- initials :: [(TxIn, TxOut CtxUTxO)]
- headId :: HeadId
- seedTxIn :: TxIn
- contestationPeriod :: ContestationPeriod
- parties :: [Party]
- participants :: [OnChainId]
- data NotAnInitReason
- observeInitTx :: Tx -> Either NotAnInitReason InitObservation
Construction
Arguments
:: NetworkId | |
-> 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 -> TxOutDatum ctx -> TxOut ctx Source #
mkHeadOutputInitial :: NetworkId -> TxIn -> HeadParameters -> TxOut CtxTx Source #
mkInitialOutput :: NetworkId -> TxIn -> OnChainId -> TxOut CtxTx Source #
Observation
data InitObservation Source #
Data which can be observed from an initTx
.
Constructors
InitObservation | |
Fields
|
Instances
data NotAnInitReason Source #
Instances
Generic NotAnInitReason Source # | |
Defined in Hydra.Tx.Init Methods from :: NotAnInitReason -> Rep NotAnInitReason x Source # to :: Rep NotAnInitReason x -> NotAnInitReason Source # | |
Show NotAnInitReason Source # | |
Defined in Hydra.Tx.Init | |
Eq NotAnInitReason Source # | |
Defined in Hydra.Tx.Init Methods (==) :: NotAnInitReason -> NotAnInitReason -> Bool Source # (/=) :: NotAnInitReason -> NotAnInitReason -> Bool Source # | |
type Rep NotAnInitReason Source # | |
Defined in Hydra.Tx.Init type Rep NotAnInitReason = D1 ('MetaData "NotAnInitReason" "Hydra.Tx.Init" "hydra-tx-0.20.0-b01Sd51Fpn1r0Mfj7XdB1" 'False) ((C1 ('MetaCons "NoHeadOutput" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAHeadDatum" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "InvalidPartyInDatum" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NoSTFound" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAHeadPolicy" 'PrefixI 'False) (U1 :: Type -> Type)))) |
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).