Skip to content

Commit 8d124ff

Browse files
cardano-api: 10.17
1 parent 0a7d6a3 commit 8d124ff

File tree

26 files changed

+254
-328
lines changed

26 files changed

+254
-328
lines changed

cabal.project

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ test-show-details: direct
3030

3131
program-options
3232
ghc-options: -fwrite-ide-info
33+
34+
source-repository-package
35+
type: git
36+
location: https://github.com/locallycompact/cardano-api
37+
tag: 2b8c608c9be8d17cdf14565256a3b7d1e61817f0
38+
--sha256: sha256-vyhCsgzpvTexsaY2W/KU6aIL2RnGvEWbhRYOoh6P3QY=
39+
subdir:
40+
cardano-api

hydra-cardano-api/hydra-cardano-api.cabal

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ library
4040
hs-source-dirs: src
4141
ghc-options: -haddock
4242
exposed-modules:
43-
Cardano.Api.UTxO
4443
Hydra.Cardano.Api
4544
Hydra.Cardano.Api.Address
4645
Hydra.Cardano.Api.AddressInEra
47-
Hydra.Cardano.Api.BlockHeader
4846
Hydra.Cardano.Api.ChainPoint
4947
Hydra.Cardano.Api.ExecutionUnits
5048
Hydra.Cardano.Api.Hash
@@ -76,7 +74,7 @@ library
7674
, aeson >=2
7775
, base >=4.14
7876
, bytestring
79-
, cardano-api ^>=10.16
77+
, cardano-api ^>=10.17
8078
, cardano-api:gen
8179
, cardano-binary
8280
, cardano-crypto-class

hydra-cardano-api/src/Cardano/Api/UTxO.hs

Lines changed: 0 additions & 153 deletions
This file was deleted.

hydra-cardano-api/src/Hydra/Cardano/Api.hs

Lines changed: 34 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ module Hydra.Cardano.Api (
2323
-- * Wrapped Types
2424
module Hydra.Cardano.Api,
2525

26-
-- ** UTxO
27-
UTxO,
28-
UTxO' (UTxO),
29-
3026
-- * Extras
3127
module Extras,
3228

@@ -38,9 +34,10 @@ import Cardano.Api as X hiding (
3834
AddressInEra (..),
3935
AddressTypeInEra (..),
4036
BalancedTxBody (..),
41-
Key (..),
42-
KeyWitness,
37+
KeyWitness (..),
4338
PlutusScript,
39+
PlutusScriptSerialised,
40+
ReferenceScript (..),
4441
Script (..),
4542
ScriptInEra (..),
4643
ScriptLanguage (..),
@@ -82,38 +79,13 @@ import Cardano.Api as X hiding (
8279
toLedgerValue,
8380
(<+>),
8481
)
82+
import Cardano.Api.Key as X
8583
import Cardano.Api.Ledger as X (
8684
PParams,
8785
)
88-
import Cardano.Api.Shelley as X (
89-
AcquiringFailure (..),
90-
Hash (HeaderHash),
91-
Key (..),
92-
PlutusScriptOrReferenceInput (PScript),
93-
PoolId,
94-
ShelleyGenesis (..),
95-
ShelleyLedgerEra,
96-
SigningKey (..),
97-
StakeCredential (..),
98-
VerificationKey (..),
99-
fromAlonzoCostModels,
100-
fromAlonzoPrices,
101-
fromPlutusData,
102-
fromShelleyMetadata,
103-
toAlonzoPrices,
104-
toPlutusData,
105-
toShelleyMetadata,
106-
toShelleyNetwork,
107-
)
108-
import Cardano.Api.UTxO (
109-
UTxO,
110-
UTxO' (..),
111-
)
112-
import Cardano.Ledger.Coin as X (Coin (..))
11386
import Hydra.Cardano.Api.Prelude (
11487
Era,
11588
LedgerEra,
116-
LedgerProtocolParameters,
11789
Map,
11890
ledgerEraVersion,
11991
)
@@ -145,8 +117,6 @@ import Hydra.Cardano.Api.Value as Extras
145117
import Hydra.Cardano.Api.Witness as Extras
146118

147119
import Cardano.Api qualified
148-
import Cardano.Api.Internal.Tx.Body (TxInsReferenceDatums)
149-
import Cardano.Api.Shelley qualified
150120
import Cardano.Ledger.Alonzo.TxAuxData qualified as Ledger
151121
import Cardano.Ledger.Alonzo.TxWits qualified as Ledger
152122
import Cardano.Ledger.BaseTypes as X (Network)
@@ -212,17 +182,17 @@ type KeyWitness = Cardano.Api.KeyWitness Era
212182

213183
pattern ShelleyBootstrapWitness :: Ledger.BootstrapWitness -> KeyWitness
214184
pattern ShelleyBootstrapWitness{shelleyBootstrapWitness} <-
215-
Cardano.Api.Shelley.ShelleyBootstrapWitness _ shelleyBootstrapWitness
185+
Cardano.Api.ShelleyBootstrapWitness _ shelleyBootstrapWitness
216186
where
217187
ShelleyBootstrapWitness =
218-
Cardano.Api.Shelley.ShelleyBootstrapWitness shelleyBasedEra
188+
Cardano.Api.ShelleyBootstrapWitness shelleyBasedEra
219189

220190
pattern ShelleyKeyWitness :: Ledger.WitVKey 'Ledger.Witness -> KeyWitness
221191
pattern ShelleyKeyWitness{shelleyKeyWitness} <-
222-
Cardano.Api.Shelley.ShelleyKeyWitness _ shelleyKeyWitness
192+
Cardano.Api.ShelleyKeyWitness _ shelleyKeyWitness
223193
where
224194
ShelleyKeyWitness =
225-
Cardano.Api.Shelley.ShelleyKeyWitness shelleyBasedEra
195+
Cardano.Api.ShelleyKeyWitness shelleyBasedEra
226196

227197
-- ** PlutusScript
228198

@@ -231,10 +201,10 @@ type PlutusScript = Cardano.Api.PlutusScript PlutusScriptV3
231201

232202
pattern PlutusScriptSerialised :: ShortByteString -> PlutusScript
233203
pattern PlutusScriptSerialised{plutusScriptSerialised} <-
234-
Cardano.Api.Shelley.PlutusScriptSerialised plutusScriptSerialised
204+
Cardano.Api.PlutusScriptSerialised plutusScriptSerialised
235205
where
236206
PlutusScriptSerialised =
237-
Cardano.Api.Shelley.PlutusScriptSerialised
207+
Cardano.Api.PlutusScriptSerialised
238208

239209
-- ** Script
240210

@@ -243,10 +213,10 @@ type Script = Cardano.Api.Script PlutusScriptV3
243213

244214
pattern PlutusScript :: PlutusScript -> Script
245215
pattern PlutusScript{plutusScript} <-
246-
Cardano.Api.Shelley.PlutusScript _ plutusScript
216+
Cardano.Api.PlutusScript _ plutusScript
247217
where
248218
PlutusScript =
249-
Cardano.Api.Shelley.PlutusScript PlutusScriptV3
219+
Cardano.Api.PlutusScript PlutusScriptV3
250220

251221
-- ** ScriptInEra
252222

@@ -259,10 +229,10 @@ type ScriptLanguage = Cardano.Api.ScriptLanguage PlutusScriptV3
259229

260230
pattern PlutusScriptLanguage :: ScriptLanguage
261231
pattern PlutusScriptLanguage <-
262-
Cardano.Api.Shelley.PlutusScriptLanguage _
232+
Cardano.Api.PlutusScriptLanguage _
263233
where
264234
PlutusScriptLanguage =
265-
Cardano.Api.Shelley.PlutusScriptLanguage PlutusScriptV3
235+
Cardano.Api.PlutusScriptLanguage PlutusScriptV3
266236

267237
-- ** ScriptWitness
268238

@@ -322,7 +292,7 @@ pattern ShelleyTxBody
322292
, txBodyAuxiliaryData
323293
, txBodyScriptValidity
324294
} <-
325-
Cardano.Api.Shelley.ShelleyTxBody
295+
Cardano.Api.ShelleyTxBody
326296
_
327297
txBodyLedgerTxBody
328298
txBodyScripts
@@ -331,7 +301,7 @@ pattern ShelleyTxBody
331301
txBodyScriptValidity
332302
where
333303
ShelleyTxBody =
334-
Cardano.Api.Shelley.ShelleyTxBody shelleyBasedEra
304+
Cardano.Api.ShelleyTxBody shelleyBasedEra
335305

336306
signShelleyTransaction :: TxBody -> [ShelleyWitnessSigningKey] -> Tx
337307
signShelleyTransaction = Cardano.Api.signShelleyTransaction shelleyBasedEra
@@ -600,25 +570,25 @@ pattern TxOut{txOutAddress, txOutValue, txOutDatum, txOutReferenceScript} <-
600570

601571
-- ** ReferenceScript
602572

603-
type ReferenceScript = Cardano.Api.Shelley.ReferenceScript Era
573+
type ReferenceScript = Cardano.Api.ReferenceScript Era
604574
{-# COMPLETE ReferenceScript, ReferenceScriptNone #-}
605575

606576
pattern ReferenceScript :: ScriptInAnyLang -> ReferenceScript
607577
pattern ReferenceScript{referenceScript} <-
608-
Cardano.Api.Shelley.ReferenceScript
578+
Cardano.Api.ReferenceScript
609579
_
610580
referenceScript
611581
where
612582
ReferenceScript =
613-
Cardano.Api.Shelley.ReferenceScript
583+
Cardano.Api.ReferenceScript
614584
babbageBasedEra
615585

616-
pattern ReferenceScriptNone :: Cardano.Api.Shelley.ReferenceScript Era
586+
pattern ReferenceScriptNone :: Cardano.Api.ReferenceScript Era
617587
pattern ReferenceScriptNone <-
618-
Cardano.Api.Shelley.ReferenceScriptNone
588+
Cardano.Api.ReferenceScriptNone
619589
where
620590
ReferenceScriptNone =
621-
Cardano.Api.Shelley.ReferenceScriptNone
591+
Cardano.Api.ReferenceScriptNone
622592

623593
-- ** TxOutDatum
624594

@@ -729,3 +699,15 @@ pattern ScriptWitness scriptWitnessInCtx scriptWitness <-
729699

730700
makeShelleyKeyWitness :: TxBody -> ShelleyWitnessSigningKey -> KeyWitness
731701
makeShelleyKeyWitness = Cardano.Api.makeShelleyKeyWitness shelleyBasedEra
702+
703+
type UTxO = Cardano.Api.UTxO Era
704+
705+
{-# COMPLETE UTxO #-}
706+
pattern UTxO ::
707+
Map TxIn (TxOut CtxUTxO) ->
708+
UTxO
709+
pattern UTxO{utxo} <-
710+
Cardano.Api.UTxO utxo
711+
where
712+
UTxO =
713+
Cardano.Api.UTxO

0 commit comments

Comments
 (0)