Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/reexport-txauxdata-accessors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project: cardano-api
pr: 1262
kind:
- compatible
description: |
Re-export additional ledger accessors from `Cardano.Api.Ledger` so downstream code can read a transaction and its outputs through the ledger lenses without depending on `cardano-ledger` directly: `auxDataTxL` (via `EraTx`), `metadataTxAuxDataL` (via `EraTxAuxData`), `addrTxOutL` / `valueTxOutL` (via `EraTxOut`), `datumTxOutF` (via `AlonzoEraTxOut`), plus `Datum (..)`, `hashBinaryData`, and `hashScript`.
18 changes: 13 additions & 5 deletions cardano-api/src/Cardano/Api/Ledger/Internal/Reexport.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module Cardano.Api.Ledger.Internal.Reexport
, toCompactPartial
, EraPParams (..)
, Era (..)
, EraTxOut
, EraTxOut (addrTxOutL, valueTxOutL)
, Inject (..)
, Network (..)
, PoolCert (..)
Expand Down Expand Up @@ -151,6 +151,10 @@ module Cardano.Api.Ledger.Internal.Reexport
, AsIx (..)
, CoinPerWord (..)
, Data (..)
, Datum (..)
, AlonzoEraTxOut (datumTxOutF)
, hashBinaryData
, hashScript
, EraTxWits (..)
, ExUnits (..)
, Redeemers (..)
Expand All @@ -163,7 +167,8 @@ module Cardano.Api.Ledger.Internal.Reexport
, pattern AlonzoGenesis
, AsIxItem (..)
, EraGov
, EraTx (witsTxL, bodyTxL)
, EraTx (witsTxL, bodyTxL, auxDataTxL)
, EraTxAuxData (metadataTxAuxDataL)
, EraTxBody (..)
, TopTx
, Tx
Expand Down Expand Up @@ -223,12 +228,13 @@ import Cardano.Ledger.Allegra.Scripts (AllegraEraScript (..), Timelock (..), sho
import Cardano.Ledger.Alonzo.Core
( AlonzoEraScript (..)
, AlonzoEraTxBody (..)
, AlonzoEraTxOut (datumTxOutF)
, AlonzoEraTxWits (..)
, AsIx (..)
, AsIxItem (AsIxItem)
, CoinPerWord (..)
, EraGov
, EraTx (bodyTxL, witsTxL)
, EraTx (auxDataTxL, bodyTxL, witsTxL)
, EraTxWits (..)
, PParamsUpdate (..)
, Tx
Expand Down Expand Up @@ -347,14 +353,16 @@ import Cardano.Ledger.Conway.TxCert
import Cardano.Ledger.Core
( Era (..)
, EraPParams (..)
, EraTxAuxData (metadataTxAuxDataL)
, EraTxBody (..)
, EraTxOut
, EraTxOut (addrTxOutL, valueTxOutL)
, PParams (..)
, PoolCert (..)
, TopTx
, TxOut
, Value
, fromEraCBOR
, hashScript
, mkBasicTxOut
, ppMinFeeAL
, ppMinUTxOValueL
Expand All @@ -381,7 +389,7 @@ import Cardano.Ledger.Keys
, toVRFVerKeyHash
)
import Cardano.Ledger.Mary.Value (MaryValue (..), MultiAsset (..), PolicyID (..), valueFromList)
import Cardano.Ledger.Plutus.Data (Data (..), unData)
import Cardano.Ledger.Plutus.Data (Data (..), Datum (..), hashBinaryData, unData)
import Cardano.Ledger.Plutus.Language
( Language
, Plutus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import Cardano.Ledger.Conway qualified as L
import Cardano.Ledger.Core qualified as L
import Cardano.Ledger.Dijkstra.Genesis (DijkstraGenesis (..))
import Cardano.Ledger.Mary.Value qualified as Mary
import Cardano.Ledger.Plutus.Data qualified as L
import Cardano.Ledger.Plutus.Language qualified as Plutus
import Cardano.Slotting.EpochInfo qualified as Slotting
import Cardano.Slotting.Slot qualified as Slotting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import Cardano.Api.Serialise.Cbor (SerialiseAsCBOR (..))

import Cardano.Ledger.Conway qualified as L
import Cardano.Ledger.Conway.Scripts qualified as L
import Cardano.Ledger.Core qualified as L
import Cardano.Ledger.Dijkstra.Scripts qualified as L
import Cardano.Ledger.Plutus.Language qualified as L

Expand Down
Loading