Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
UtxowPredicateFail
era
- = WrappedShelleyEraFailure !( UtxowPredicateFailure era)
- | MissingRedeemers ![( ScriptPurpose ( Crypto era), ScriptHash ( Crypto era))]
- | MissingRequiredDatums !( Set ( DataHash ( Crypto era))) !( Set ( DataHash ( Crypto era)))
- | NonOutputSupplimentaryDatums !( Set ( DataHash ( Crypto era))) !( Set ( DataHash ( Crypto era)))
- | PPViewHashesDontMatch !( StrictMaybe ( ScriptIntegrityHash ( Crypto era))) !( StrictMaybe ( ScriptIntegrityHash ( Crypto era)))
- | MissingRequiredSigners ( Set ( KeyHash ' Witness ( Crypto era)))
- | UnspendableUTxONoDatumHash ( Set ( TxIn ( Crypto era)))
- | ExtraRedeemers ![ RdmrPtr ]
- newtype AlonzoEvent era = WrappedShelleyEraEvent ( UtxowEvent era)
- encodePredFail :: ( Era era, ToCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => UtxowPredicateFail era -> Encode ' Open ( UtxowPredicateFail era)
- decodePredFail :: ( Era era, FromCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => Word -> Decode ' Open ( UtxowPredicateFail era)
- langsUsed :: forall era. ( Script era ~ Script era, ValidateScript era) => Map ( ScriptHash ( Crypto era)) ( Script era) -> Set Language
- missingRequiredDatums :: forall era. ( ValidateScript era, Script era ~ Script era, ExtendedUTxO era) => Map ( ScriptHash ( Crypto era)) ( Script era) -> UTxO era -> ValidatedTx era -> TxBody era -> Test ( UtxowPredicateFail era)
- hasExactSetOfRedeemers :: forall era. ( Era era, ValidateScript era, ExtendedUTxO era, Script era ~ Script era, Tx era ~ ValidatedTx era, HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era))), HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era))) => UTxO era -> Tx era -> TxBody era -> Test ( UtxowPredicateFail era)
- requiredSignersAreWitnessed :: forall era. HasField "reqSignerHashes" ( TxBody era) ( Set ( KeyHash ' Witness ( Crypto era))) => TxBody era -> WitHashes ( Crypto era) -> Test ( UtxowPredicateFail era)
- ppViewHashesMatch :: forall era. ( ValidateScript era, ExtendedUTxO era, Script era ~ Script era, Tx era ~ ValidatedTx era, HasField "scriptIntegrityHash" ( TxBody era) ( StrictMaybe ( ScriptIntegrityHash ( Crypto era))), HasField "_costmdls" ( PParams era) CostModels ) => Tx era -> TxBody era -> PParams era -> UTxO era -> Set ( ScriptHash ( Crypto era)) -> Test ( UtxowPredicateFail era)
- alonzoStyleWitness :: forall era. ( ValidateScript era, ValidateAuxiliaryData era ( Crypto era), ExtendedUTxO era, ConcreteAlonzo era, Tx era ~ ValidatedTx era, Witnesses era ~ TxWitness era, Signable ( DSIGN ( Crypto era)) ( Hash ( HASH ( Crypto era)) EraIndependentTxBody ), Embed ( EraRule "UTXO" era) ( AlonzoUTXOW era), Environment ( EraRule "UTXO" era) ~ UtxoEnv era, State ( EraRule "UTXO" era) ~ UTxOState era, Signal ( EraRule "UTXO" era) ~ ValidatedTx era) => TransitionRule ( AlonzoUTXOW era)
- witsVKeyNeeded :: forall era tx. ( Era era, HasField "body" tx ( TxBody era), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era)), HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era))), HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "collateral" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "update" ( TxBody era) ( StrictMaybe ( Update era))) => UTxO era -> tx -> GenDelegs ( Crypto era) -> WitHashes ( Crypto era)
- extSymmetricDifference :: Ord k => [a] -> (a -> k) -> [b] -> (b -> k) -> ([a], [b])
- data AlonzoUTXOW era
Documentation
data UtxowPredicateFail era Source #
The Predicate failure type in the Alonzo Era. It embeds the Predicate failure type of the Shelley Era, as they share some failure modes.
WrappedShelleyEraFailure !( UtxowPredicateFailure era) | |
MissingRedeemers ![( ScriptPurpose ( Crypto era), ScriptHash ( Crypto era))] |
List of scripts for which no redeemers were supplied |
MissingRequiredDatums | |
NonOutputSupplimentaryDatums | |
PPViewHashesDontMatch | |
|
|
MissingRequiredSigners ( Set ( KeyHash ' Witness ( Crypto era))) |
Set of witnesses which were needed and not supplied |
UnspendableUTxONoDatumHash ( Set ( TxIn ( Crypto era))) |
Set of transaction inputs that are TwoPhase scripts, and should have a DataHash but don't |
ExtraRedeemers ![ RdmrPtr ] |
List of redeemers not needed |
Instances
newtype AlonzoEvent era Source #
WrappedShelleyEraEvent ( UtxowEvent era) |
encodePredFail :: ( Era era, ToCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => UtxowPredicateFail era -> Encode ' Open ( UtxowPredicateFail era) Source #
decodePredFail :: ( Era era, FromCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => Word -> Decode ' Open ( UtxowPredicateFail era) Source #
langsUsed :: forall era. ( Script era ~ Script era, ValidateScript era) => Map ( ScriptHash ( Crypto era)) ( Script era) -> Set Language Source #
given the "txscripts" field of the Witnesses, compute the set of languages used in a transaction
missingRequiredDatums :: forall era. ( ValidateScript era, Script era ~ Script era, ExtendedUTxO era) => Map ( ScriptHash ( Crypto era)) ( Script era) -> UTxO era -> ValidatedTx era -> TxBody era -> Test ( UtxowPredicateFail era) Source #
hasExactSetOfRedeemers :: forall era. ( Era era, ValidateScript era, ExtendedUTxO era, Script era ~ Script era, Tx era ~ ValidatedTx era, HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era))), HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era))) => UTxO era -> Tx era -> TxBody era -> Test ( UtxowPredicateFail era) Source #
requiredSignersAreWitnessed :: forall era. HasField "reqSignerHashes" ( TxBody era) ( Set ( KeyHash ' Witness ( Crypto era))) => TxBody era -> WitHashes ( Crypto era) -> Test ( UtxowPredicateFail era) Source #
ppViewHashesMatch :: forall era. ( ValidateScript era, ExtendedUTxO era, Script era ~ Script era, Tx era ~ ValidatedTx era, HasField "scriptIntegrityHash" ( TxBody era) ( StrictMaybe ( ScriptIntegrityHash ( Crypto era))), HasField "_costmdls" ( PParams era) CostModels ) => Tx era -> TxBody era -> PParams era -> UTxO era -> Set ( ScriptHash ( Crypto era)) -> Test ( UtxowPredicateFail era) Source #
alonzoStyleWitness :: forall era. ( ValidateScript era, ValidateAuxiliaryData era ( Crypto era), ExtendedUTxO era, ConcreteAlonzo era, Tx era ~ ValidatedTx era, Witnesses era ~ TxWitness era, Signable ( DSIGN ( Crypto era)) ( Hash ( HASH ( Crypto era)) EraIndependentTxBody ), Embed ( EraRule "UTXO" era) ( AlonzoUTXOW era), Environment ( EraRule "UTXO" era) ~ UtxoEnv era, State ( EraRule "UTXO" era) ~ UTxOState era, Signal ( EraRule "UTXO" era) ~ ValidatedTx era) => TransitionRule ( AlonzoUTXOW era) Source #
A very specialized transitionRule function for the Alonzo Era.
witsVKeyNeeded :: forall era tx. ( Era era, HasField "body" tx ( TxBody era), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era)), HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era))), HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "collateral" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "update" ( TxBody era) ( StrictMaybe ( Update era))) => UTxO era -> tx -> GenDelegs ( Crypto era) -> WitHashes ( Crypto era) Source #
Collect the set of hashes of keys that needs to sign a given transaction. This set consists of the txin owners, certificate authors, and withdrawal reward accounts.
Compared to pre-Alonzo eras, we additionally gather the certificates required to authenticate collateral witnesses.
extSymmetricDifference :: Ord k => [a] -> (a -> k) -> [b] -> (b -> k) -> ([a], [b]) Source #
data AlonzoUTXOW era Source #