Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data AlonzoContextError era
- data TxOutSource c
- = TxOutFromInput !(TxIn c)
- | TxOutFromOutput !TxIx
- transLookupTxOut ∷ ∀ era a. Inject (AlonzoContextError era) a ⇒ UTxO era → TxIn (EraCrypto era) → Either a (TxOut era)
- transTxOut ∷ (Value era ~ MaryValue c, AlonzoEraTxOut era) ⇒ TxOut era → Maybe TxOut
- transValidityInterval ∷ ∀ proxy era a. Inject (AlonzoContextError era) a ⇒ proxy era → ProtVer → EpochInfo (Either Text) → SystemStart → ValidityInterval → Either a POSIXTimeRange
- transPolicyID ∷ PolicyID c → CurrencySymbol
- transAssetName ∷ AssetName → TokenName
- transMultiAsset ∷ MultiAsset c → Value
- transMintValue ∷ MultiAsset c → Value
- transValue ∷ MaryValue c → Value
- transWithdrawals ∷ Withdrawals c → Map StakingCredential Integer
- transDataPair ∷ (DataHash c, Data era) → (DatumHash, Datum)
- transTxCert ∷ (ShelleyEraTxCert era, ProtVerAtMost era 8) ⇒ TxCert era → DCert
- transTxCertCommon ∷ ShelleyEraTxCert era ⇒ TxCert era → Maybe DCert
- transPlutusPurpose ∷ (EraPlutusTxInfo l era, PlutusTxCert l ~ DCert) ⇒ proxy l → ProtVer → AlonzoPlutusPurpose AsItem era → Either (ContextError era) ScriptPurpose
- transTxBodyId ∷ EraTxBody era ⇒ TxBody era → TxId
- transTxBodyCerts ∷ (EraPlutusTxInfo l era, EraTxBody era) ⇒ proxy l → ProtVer → TxBody era → Either (ContextError era) [PlutusTxCert l]
- transTxBodyWithdrawals ∷ EraTxBody era ⇒ TxBody era → [(StakingCredential, Integer)]
- transTxBodyReqSignerHashes ∷ AlonzoEraTxBody era ⇒ TxBody era → [PubKeyHash]
- transTxWitsDatums ∷ AlonzoEraTxWits era ⇒ TxWits era → [(DatumHash, Datum)]
- toPlutusV1Args ∷ EraPlutusTxInfo 'PlutusV1 era ⇒ proxy 'PlutusV1 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV1)
- toLegacyPlutusArgs ∷ EraPlutusTxInfo l era ⇒ proxy l → ProtVer → (PlutusScriptPurpose l → PlutusScriptContext l) → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (LegacyPlutusArgs l)
Documentation
data AlonzoContextError era Source #
Instances
data TxOutSource c Source #
A transaction output can be translated because it is a newly created output, or because it is the output which is connected to a transaction input being spent.
Instances
transLookupTxOut ∷ ∀ era a. Inject (AlonzoContextError era) a ⇒ UTxO era → TxIn (EraCrypto era) → Either a (TxOut era) Source #
transTxOut ∷ (Value era ~ MaryValue c, AlonzoEraTxOut era) ⇒ TxOut era → Maybe TxOut Source #
Translate a TxOut. Returns Nothing
if a Byron address is present in the TxOut.
transValidityInterval ∷ ∀ proxy era a. Inject (AlonzoContextError era) a ⇒ proxy era → ProtVer → EpochInfo (Either Text) → SystemStart → ValidityInterval → Either a POSIXTimeRange Source #
Translate a validity interval to POSIX time
transMultiAsset ∷ MultiAsset c → Value Source #
transMintValue ∷ MultiAsset c → Value Source #
Hysterical raisins:
Previously transaction body contained a mint field with MaryValue instead of a MultiAsset, which has changed since then to just MultiAsset (because minting ADA makes no sense). However, if we don't preserve previous translation, scripts that previously succeeded will fail.
transValue ∷ MaryValue c → Value Source #
transTxCert ∷ (ShelleyEraTxCert era, ProtVerAtMost era 8) ⇒ TxCert era → DCert Source #
transTxCertCommon ∷ ShelleyEraTxCert era ⇒ TxCert era → Maybe DCert Source #
Just like transTxCert
, but do not translate certificates that were deprecated in Conway
transPlutusPurpose ∷ (EraPlutusTxInfo l era, PlutusTxCert l ~ DCert) ⇒ proxy l → ProtVer → AlonzoPlutusPurpose AsItem era → Either (ContextError era) ScriptPurpose Source #
transTxBodyCerts ∷ (EraPlutusTxInfo l era, EraTxBody era) ⇒ proxy l → ProtVer → TxBody era → Either (ContextError era) [PlutusTxCert l] Source #
transTxBodyWithdrawals ∷ EraTxBody era ⇒ TxBody era → [(StakingCredential, Integer)] Source #
Translate all Withdrawal
s from within a TxBody
transTxBodyReqSignerHashes ∷ AlonzoEraTxBody era ⇒ TxBody era → [PubKeyHash] Source #
Translate all required signers produced by reqSignerHashesTxBodyL
s from within a
TxBody
transTxWitsDatums ∷ AlonzoEraTxWits era ⇒ TxWits era → [(DatumHash, Datum)] Source #
Translate all TxDats
s from within TxWits
LgacyPlutusArgs helpers
toPlutusV1Args ∷ EraPlutusTxInfo 'PlutusV1 era ⇒ proxy 'PlutusV1 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV1) Source #
toLegacyPlutusArgs ∷ EraPlutusTxInfo l era ⇒ proxy l → ProtVer → (PlutusScriptPurpose l → PlutusScriptContext l) → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (LegacyPlutusArgs l) Source #