Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Lenses for cardano-api
types
Synopsis
- emptyTx ∷ TxBodyContent BuildTx BabbageEra
- emptyTxOut ∷ AddressInEra BabbageEra → TxOut CtxTx BabbageEra
- type TxIn v = (TxIn, BuildTxWith v (Witness WitCtxTxIn BabbageEra))
- txIns ∷ Lens' (TxBodyContent v BabbageEra) [TxIn v]
- txInsReference ∷ Lens' (TxBodyContent v BabbageEra) (TxInsReference v BabbageEra)
- txOuts ∷ Lens' (TxBodyContent v BabbageEra) [TxOut CtxTx BabbageEra]
- txMintValue ∷ Lens' (TxBodyContent v BabbageEra) (TxMintValue v BabbageEra)
- txFee ∷ Lens' (TxBodyContent v BabbageEra) Lovelace
- txFee' ∷ Lens' (TxBodyContent v e) (TxFee e)
- txValidityRange ∷ Lens' (TxBodyContent v e) (TxValidityLowerBound e, TxValidityUpperBound e)
- txMetadata ∷ Lens' (TxBodyContent v BabbageEra) (TxMetadataInEra BabbageEra)
- txProtocolParams ∷ Lens' (TxBodyContent v e) (BuildTxWith v (Maybe ProtocolParameters))
- txInsCollateral ∷ Lens' (TxBodyContent v BabbageEra) (TxInsCollateral BabbageEra)
- txScriptValidity ∷ Lens' (TxBodyContent v e) (TxScriptValidity e)
- txAuxScripts ∷ Lens' (TxBodyContent v BabbageEra) (TxAuxScripts BabbageEra)
- txExtraKeyWits ∷ Lens' (TxBodyContent v BabbageEra) (TxExtraKeyWitnesses BabbageEra)
- _TxMintValue ∷ Iso' (TxMintValue BuildTx BabbageEra) (Value, Map PolicyId (ScriptWitness WitCtxMint BabbageEra))
- _TxInsReference ∷ Iso' (TxInsReference build BabbageEra) [TxIn]
- _Value ∷ Iso' Value (Map AssetId Quantity)
- _TxOut ∷ Iso' (TxOut ctx era) (AddressInEra era, TxOutValue era, TxOutDatum ctx era, ReferenceScript era)
- _TxOutValue ∷ Iso' (TxOutValue BabbageEra) Value
- _ShelleyAddressInBabbageEra ∷ Prism' (AddressInEra BabbageEra) (Network, PaymentCredential StandardCrypto, StakeReference StandardCrypto)
- _PaymentCredentialByKey ∷ Prism' PaymentCredential (Hash PaymentKey)
- _ShelleyPaymentCredentialByKey ∷ Prism' (PaymentCredential StandardCrypto) (KeyHash 'Payment StandardCrypto)
- _PaymentCredentialByScript ∷ Prism' PaymentCredential ScriptHash
- _ShelleyPaymentCredentialByScript ∷ Prism' (PaymentCredential StandardCrypto) (ScriptHash StandardCrypto)
- _TxInsCollateral ∷ Iso' (TxInsCollateral BabbageEra) [TxIn]
- _TxMetadata ∷ Iso' (TxMetadataInEra BabbageEra) (Map Word64 TxMetadataValue)
- _TxAuxScripts ∷ Iso' (TxAuxScripts BabbageEra) [ScriptInEra BabbageEra]
- _TxExtraKeyWitnesses ∷ Iso' (TxExtraKeyWitnesses BabbageEra) [Hash PaymentKey]
- _TxValidityNoLowerBound ∷ ∀ era. Prism' (TxValidityLowerBound era) ()
- _TxValidityLowerBound ∷ ∀ era. Prism' (TxValidityLowerBound era) (ValidityLowerBoundSupportedInEra era, SlotNo)
- _TxValidityNoUpperBound ∷ ∀ era. Prism' (TxValidityUpperBound era) (ValidityNoUpperBoundSupportedInEra era)
- _TxValidityUpperBound ∷ ∀ era. Prism' (TxValidityUpperBound era) (ValidityUpperBoundSupportedInEra era, SlotNo)
- _TxValidityFiniteRange ∷ Prism' (TxValidityLowerBound BabbageEra, TxValidityUpperBound BabbageEra) (SlotNo, SlotNo)
- _KeyWitness ∷ Prism' (Witness witctx era) (KeyWitnessInCtx witctx)
- _ScriptWitness ∷ Prism' (Witness witctx era) (ScriptWitnessInCtx witctx, ScriptWitness witctx era)
- _PlutusScriptWitnessV1 ∷ ∀ era witctx. Prism' (ScriptWitness witctx era) (ScriptLanguageInEra PlutusScriptV1 era, PlutusScriptVersion PlutusScriptV1, PlutusScriptOrReferenceInput PlutusScriptV1, ScriptDatum witctx, ScriptRedeemer, ExecutionUnits)
- _PlutusScriptWitnessV2 ∷ ∀ era witctx. Prism' (ScriptWitness witctx era) (ScriptLanguageInEra PlutusScriptV2 era, PlutusScriptVersion PlutusScriptV2, PlutusScriptOrReferenceInput PlutusScriptV2, ScriptDatum witctx, ScriptRedeemer, ExecutionUnits)
- _BuildTxWith ∷ Iso' (BuildTxWith BuildTx a) a
- _ViewTx ∷ Iso' (BuildTxWith ViewTx a) ()
- slot ∷ Lens' (LedgerEnv era) SlotNo
- _UTxOState ∷ ∀ era. EraTxOut era ⇒ PParams era → Iso' (UTxOState era) (UTxO era, Coin, Coin, GovernanceState era)
- utxoState ∷ Lens' (LedgerState era) (UTxOState era)
- _AddressInEra ∷ Prism' (AddressInEra BabbageEra) (Address ShelleyAddr)
- _Address ∷ Iso' (Address ShelleyAddr) (Network, PaymentCredential StandardCrypto, StakeReference StandardCrypto)
- _ScriptHash ∷ Iso' (ScriptHash StandardCrypto) ScriptHash
- _KeyHash ∷ Iso' (KeyHash 'Payment StandardCrypto) (Hash PaymentKey)
- _PlutusPubKeyHash ∷ Prism' PubKeyHash (Hash PaymentKey)
- _PaymentCredential ∷ Iso' PaymentCredential (PaymentCredential StandardCrypto)
- _TxOutDatumInline ∷ ∀ ctx. Prism' (TxOutDatum ctx BabbageEra) HashableScriptData
- _TxOutDatumInTx ∷ Prism' (TxOutDatum CtxTx BabbageEra) HashableScriptData
- _TxOutDatumHash ∷ Prism' (TxOutDatum ctx BabbageEra) (Hash ScriptData)
- _ScriptData ∷ ∀ a. (FromData a, ToData a) ⇒ Prism' ScriptData a
Tx body content lenses
emptyTx ∷ TxBodyContent BuildTx BabbageEra Source #
TxBodyContent
with all fields set to empty, none, default values
emptyTxOut ∷ AddressInEra BabbageEra → TxOut CtxTx BabbageEra Source #
A transaction output with no value
type TxIn v = (TxIn, BuildTxWith v (Witness WitCtxTxIn BabbageEra)) Source #
txIns ∷ Lens' (TxBodyContent v BabbageEra) [TxIn v] Source #
txOuts ∷ Lens' (TxBodyContent v BabbageEra) [TxOut CtxTx BabbageEra] Source #
txMintValue ∷ Lens' (TxBodyContent v BabbageEra) (TxMintValue v BabbageEra) Source #
txFee ∷ Lens' (TxBodyContent v BabbageEra) Lovelace Source #
txValidityRange ∷ Lens' (TxBodyContent v e) (TxValidityLowerBound e, TxValidityUpperBound e) Source #
txProtocolParams ∷ Lens' (TxBodyContent v e) (BuildTxWith v (Maybe ProtocolParameters)) Source #
txScriptValidity ∷ Lens' (TxBodyContent v e) (TxScriptValidity e) Source #
Prisms and Isos
_TxMintValue ∷ Iso' (TxMintValue BuildTx BabbageEra) (Value, Map PolicyId (ScriptWitness WitCtxMint BabbageEra)) Source #
_TxInsReference ∷ Iso' (TxInsReference build BabbageEra) [TxIn] Source #
_TxOut ∷ Iso' (TxOut ctx era) (AddressInEra era, TxOutValue era, TxOutDatum ctx era, ReferenceScript era) Source #
_ShelleyAddressInBabbageEra ∷ Prism' (AddressInEra BabbageEra) (Network, PaymentCredential StandardCrypto, StakeReference StandardCrypto) Source #
_ShelleyPaymentCredentialByKey ∷ Prism' (PaymentCredential StandardCrypto) (KeyHash 'Payment StandardCrypto) Source #
_ShelleyPaymentCredentialByScript ∷ Prism' (PaymentCredential StandardCrypto) (ScriptHash StandardCrypto) Source #
Validity intervals
_TxValidityNoLowerBound ∷ ∀ era. Prism' (TxValidityLowerBound era) () Source #
_TxValidityLowerBound ∷ ∀ era. Prism' (TxValidityLowerBound era) (ValidityLowerBoundSupportedInEra era, SlotNo) Source #
_TxValidityNoUpperBound ∷ ∀ era. Prism' (TxValidityUpperBound era) (ValidityNoUpperBoundSupportedInEra era) Source #
_TxValidityUpperBound ∷ ∀ era. Prism' (TxValidityUpperBound era) (ValidityUpperBoundSupportedInEra era, SlotNo) Source #
_TxValidityFiniteRange ∷ Prism' (TxValidityLowerBound BabbageEra, TxValidityUpperBound BabbageEra) (SlotNo, SlotNo) Source #
Witnesses
_KeyWitness ∷ Prism' (Witness witctx era) (KeyWitnessInCtx witctx) Source #
_ScriptWitness ∷ Prism' (Witness witctx era) (ScriptWitnessInCtx witctx, ScriptWitness witctx era) Source #
_PlutusScriptWitnessV1 ∷ ∀ era witctx. Prism' (ScriptWitness witctx era) (ScriptLanguageInEra PlutusScriptV1 era, PlutusScriptVersion PlutusScriptV1, PlutusScriptOrReferenceInput PlutusScriptV1, ScriptDatum witctx, ScriptRedeemer, ExecutionUnits) Source #
_PlutusScriptWitnessV2 ∷ ∀ era witctx. Prism' (ScriptWitness witctx era) (ScriptLanguageInEra PlutusScriptV2 era, PlutusScriptVersion PlutusScriptV2, PlutusScriptOrReferenceInput PlutusScriptV2, ScriptDatum witctx, ScriptRedeemer, ExecutionUnits) Source #
Build tx
_BuildTxWith ∷ Iso' (BuildTxWith BuildTx a) a Source #
Ledger API types
_UTxOState ∷ ∀ era. EraTxOut era ⇒ PParams era → Iso' (UTxOState era) (UTxO era, Coin, Coin, GovernanceState era) Source #
UTxOState
iso. Note that this doesn't touch the _stakeDistro
field. This is because the
stake distro is a function of utxo :: UTxO era
and can be computed by updateStakeDistribution mempty mempty utxo
.
Addresses
_Address ∷ Iso' (Address ShelleyAddr) (Network, PaymentCredential StandardCrypto, StakeReference StandardCrypto) Source #
Hashes
Datums
_TxOutDatumInline ∷ ∀ ctx. Prism' (TxOutDatum ctx BabbageEra) HashableScriptData Source #
_TxOutDatumHash ∷ Prism' (TxOutDatum ctx BabbageEra) (Hash ScriptData) Source #
_ScriptData ∷ ∀ a. (FromData a, ToData a) ⇒ Prism' ScriptData a Source #