Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- transScriptHash :: ScriptHash c -> ScriptHash
- transReferenceScript :: forall era. ValidateScript era => StrictMaybe ( Script era) -> Maybe ScriptHash
- txInfoOutV1 :: forall era. ( Era era, ExtendedUTxO era, ValidateScript era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => TxOutSource ( Crypto era) -> TxOut era -> Either ( TranslationError ( Crypto era)) TxOut
- txInfoOutV2 :: forall era. ( Era era, ExtendedUTxO era, ValidateScript era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => TxOutSource ( Crypto era) -> TxOut era -> Either ( TranslationError ( Crypto era)) TxOut
- txInfoInV1 :: forall era. ( ValidateScript era, ExtendedUTxO era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => UTxO era -> TxIn ( Crypto era) -> Either ( TranslationError ( Crypto era)) TxInInfo
- txInfoInV2 :: forall era. ( ValidateScript era, ExtendedUTxO era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => UTxO era -> TxIn ( Crypto era) -> Either ( TranslationError ( Crypto era)) TxInInfo
- transRedeemer :: Data era -> Redeemer
- transRedeemerPtr :: ( Era era, HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era)), HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era)))) => TxBody era -> ( RdmrPtr , ( Data era, ExUnits )) -> Either ( TranslationError ( Crypto era)) ( ScriptPurpose , Redeemer )
- babbageTxInfo :: forall era. ( Era era, ExtendedUTxO era, ValidateScript era, Value era ~ Value ( Crypto era), HasField "wits" ( Tx era) ( TxWitness era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era)), HasField "_protocolVersion" ( PParams era) ProtVer , HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "referenceInputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "reqSignerHashes" ( TxBody era) ( Set ( KeyHash ' Witness ( Crypto era))), HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era))), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era)), HasField "mint" ( TxBody era) ( Value ( Crypto era)), HasField "vldt" ( TxBody era) ValidityInterval ) => PParams era -> Language -> EpochInfo ( Either Text ) -> SystemStart -> UTxO era -> Tx era -> Either ( TranslationError ( Crypto era)) VersionedTxInfo
Documentation
transScriptHash :: ScriptHash c -> ScriptHash Source #
transReferenceScript :: forall era. ValidateScript era => StrictMaybe ( Script era) -> Maybe ScriptHash Source #
txInfoOutV1 :: forall era. ( Era era, ExtendedUTxO era, ValidateScript era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => TxOutSource ( Crypto era) -> TxOut era -> Either ( TranslationError ( Crypto era)) TxOut Source #
Given a TxOut, translate it for V2 and return (Right transalation). If the transaction contains any Byron addresses or Babbage features, return Left.
txInfoOutV2 :: forall era. ( Era era, ExtendedUTxO era, ValidateScript era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => TxOutSource ( Crypto era) -> TxOut era -> Either ( TranslationError ( Crypto era)) TxOut Source #
Given a TxOut, translate it for V2 and return (Right transalation). It is possible the address part is a Bootstrap Address, in that case return Left.
txInfoInV1 :: forall era. ( ValidateScript era, ExtendedUTxO era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => UTxO era -> TxIn ( Crypto era) -> Either ( TranslationError ( Crypto era)) TxInInfo Source #
Given a TxIn, look it up in the UTxO. If it exists, translate it to the V1 context and return (Just translation). If does not exist in the UTxO, return Nothing.
txInfoInV2 :: forall era. ( ValidateScript era, ExtendedUTxO era, Value era ~ Value ( Crypto era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era))) => UTxO era -> TxIn ( Crypto era) -> Either ( TranslationError ( Crypto era)) TxInInfo Source #
Given a TxIn, look it up in the UTxO. If it exists, translate it to the V2 context and return (Just translation). If does not exist in the UTxO, return Nothing.
transRedeemer :: Data era -> Redeemer Source #
transRedeemerPtr :: ( Era era, HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era)), HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era)))) => TxBody era -> ( RdmrPtr , ( Data era, ExUnits )) -> Either ( TranslationError ( Crypto era)) ( ScriptPurpose , Redeemer ) Source #
babbageTxInfo :: forall era. ( Era era, ExtendedUTxO era, ValidateScript era, Value era ~ Value ( Crypto era), HasField "wits" ( Tx era) ( TxWitness era), HasField "referenceScript" ( TxOut era) ( StrictMaybe ( Script era)), HasField "_protocolVersion" ( PParams era) ProtVer , HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "referenceInputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "reqSignerHashes" ( TxBody era) ( Set ( KeyHash ' Witness ( Crypto era))), HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era))), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era)), HasField "mint" ( TxBody era) ( Value ( Crypto era)), HasField "vldt" ( TxBody era) ValidityInterval ) => PParams era -> Language -> EpochInfo ( Either Text ) -> SystemStart -> UTxO era -> Tx era -> Either ( TranslationError ( Crypto era)) VersionedTxInfo Source #