Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data AlonzoContextError era
- data TxOutSource
- transLookupTxOut ∷ ∀ era a. Inject (AlonzoContextError era) a ⇒ UTxO era → TxIn → Either a (TxOut era)
- transTxOut ∷ (Value era ~ MaryValue, 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 → CurrencySymbol
- transAssetName ∷ AssetName → TokenName
- transMultiAsset ∷ MultiAsset → Value
- transMintValue ∷ MultiAsset → Value
- transValue ∷ MaryValue → Value
- transWithdrawals ∷ Withdrawals → Map StakingCredential Integer
- transDataPair ∷ (DataHash, 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 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 → Either a (TxOut era) Source #
transTxOut ∷ (Value era ~ MaryValue, 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
transMintValue ∷ MultiAsset → 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 → 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 #
Orphan instances
EraPlutusContext AlonzoEra Source # | |
type ContextError AlonzoEra = (r ∷ Type) Source # | |
EraPlutusTxInfo 'PlutusV1 AlonzoEra Source # | |
toPlutusTxCert ∷ proxy 'PlutusV1 → ProtVer → TxCert AlonzoEra → Either (ContextError AlonzoEra) (PlutusTxCert 'PlutusV1) Source # toPlutusScriptPurpose ∷ proxy 'PlutusV1 → ProtVer → PlutusPurpose AsIxItem AlonzoEra → Either (ContextError AlonzoEra) (PlutusScriptPurpose 'PlutusV1) Source # toPlutusTxInfo ∷ proxy 'PlutusV1 → LedgerTxInfo AlonzoEra → Either (ContextError AlonzoEra) (PlutusTxInfo 'PlutusV1) Source # toPlutusArgs ∷ proxy 'PlutusV1 → ProtVer → PlutusTxInfo 'PlutusV1 → PlutusPurpose AsIxItem AlonzoEra → Maybe (Data AlonzoEra) → Data AlonzoEra → Either (ContextError AlonzoEra) (PlutusArgs 'PlutusV1) Source # |