@@ -23,10 +23,6 @@ module Hydra.Cardano.Api (
23
23
-- * Wrapped Types
24
24
module Hydra.Cardano.Api ,
25
25
26
- -- ** UTxO
27
- UTxO ,
28
- UTxO' (UTxO ),
29
-
30
26
-- * Extras
31
27
module Extras ,
32
28
@@ -38,9 +34,10 @@ import Cardano.Api as X hiding (
38
34
AddressInEra (.. ),
39
35
AddressTypeInEra (.. ),
40
36
BalancedTxBody (.. ),
41
- Key (.. ),
42
- KeyWitness ,
37
+ KeyWitness (.. ),
43
38
PlutusScript ,
39
+ PlutusScriptSerialised ,
40
+ ReferenceScript (.. ),
44
41
Script (.. ),
45
42
ScriptInEra (.. ),
46
43
ScriptLanguage (.. ),
@@ -82,38 +79,13 @@ import Cardano.Api as X hiding (
82
79
toLedgerValue ,
83
80
(<+>) ,
84
81
)
82
+ import Cardano.Api.Key as X
85
83
import Cardano.Api.Ledger as X (
86
84
PParams ,
87
85
)
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 (.. ))
113
86
import Hydra.Cardano.Api.Prelude (
114
87
Era ,
115
88
LedgerEra ,
116
- LedgerProtocolParameters ,
117
89
Map ,
118
90
ledgerEraVersion ,
119
91
)
@@ -145,8 +117,6 @@ import Hydra.Cardano.Api.Value as Extras
145
117
import Hydra.Cardano.Api.Witness as Extras
146
118
147
119
import Cardano.Api qualified
148
- import Cardano.Api.Internal.Tx.Body (TxInsReferenceDatums )
149
- import Cardano.Api.Shelley qualified
150
120
import Cardano.Ledger.Alonzo.TxAuxData qualified as Ledger
151
121
import Cardano.Ledger.Alonzo.TxWits qualified as Ledger
152
122
import Cardano.Ledger.BaseTypes as X (Network )
@@ -212,17 +182,17 @@ type KeyWitness = Cardano.Api.KeyWitness Era
212
182
213
183
pattern ShelleyBootstrapWitness :: Ledger. BootstrapWitness -> KeyWitness
214
184
pattern ShelleyBootstrapWitness {shelleyBootstrapWitness} <-
215
- Cardano.Api.Shelley. ShelleyBootstrapWitness _ shelleyBootstrapWitness
185
+ Cardano.Api. ShelleyBootstrapWitness _ shelleyBootstrapWitness
216
186
where
217
187
ShelleyBootstrapWitness =
218
- Cardano.Api.Shelley. ShelleyBootstrapWitness shelleyBasedEra
188
+ Cardano.Api. ShelleyBootstrapWitness shelleyBasedEra
219
189
220
190
pattern ShelleyKeyWitness :: Ledger. WitVKey 'Ledger.Witness -> KeyWitness
221
191
pattern ShelleyKeyWitness {shelleyKeyWitness} <-
222
- Cardano.Api.Shelley. ShelleyKeyWitness _ shelleyKeyWitness
192
+ Cardano.Api. ShelleyKeyWitness _ shelleyKeyWitness
223
193
where
224
194
ShelleyKeyWitness =
225
- Cardano.Api.Shelley. ShelleyKeyWitness shelleyBasedEra
195
+ Cardano.Api. ShelleyKeyWitness shelleyBasedEra
226
196
227
197
-- ** PlutusScript
228
198
@@ -231,10 +201,10 @@ type PlutusScript = Cardano.Api.PlutusScript PlutusScriptV3
231
201
232
202
pattern PlutusScriptSerialised :: ShortByteString -> PlutusScript
233
203
pattern PlutusScriptSerialised {plutusScriptSerialised} <-
234
- Cardano.Api.Shelley. PlutusScriptSerialised plutusScriptSerialised
204
+ Cardano.Api. PlutusScriptSerialised plutusScriptSerialised
235
205
where
236
206
PlutusScriptSerialised =
237
- Cardano.Api.Shelley. PlutusScriptSerialised
207
+ Cardano.Api. PlutusScriptSerialised
238
208
239
209
-- ** Script
240
210
@@ -243,10 +213,10 @@ type Script = Cardano.Api.Script PlutusScriptV3
243
213
244
214
pattern PlutusScript :: PlutusScript -> Script
245
215
pattern PlutusScript {plutusScript} <-
246
- Cardano.Api.Shelley. PlutusScript _ plutusScript
216
+ Cardano.Api. PlutusScript _ plutusScript
247
217
where
248
218
PlutusScript =
249
- Cardano.Api.Shelley. PlutusScript PlutusScriptV3
219
+ Cardano.Api. PlutusScript PlutusScriptV3
250
220
251
221
-- ** ScriptInEra
252
222
@@ -259,10 +229,10 @@ type ScriptLanguage = Cardano.Api.ScriptLanguage PlutusScriptV3
259
229
260
230
pattern PlutusScriptLanguage :: ScriptLanguage
261
231
pattern PlutusScriptLanguage <-
262
- Cardano.Api.Shelley. PlutusScriptLanguage _
232
+ Cardano.Api. PlutusScriptLanguage _
263
233
where
264
234
PlutusScriptLanguage =
265
- Cardano.Api.Shelley. PlutusScriptLanguage PlutusScriptV3
235
+ Cardano.Api. PlutusScriptLanguage PlutusScriptV3
266
236
267
237
-- ** ScriptWitness
268
238
@@ -322,7 +292,7 @@ pattern ShelleyTxBody
322
292
, txBodyAuxiliaryData
323
293
, txBodyScriptValidity
324
294
} <-
325
- Cardano.Api.Shelley. ShelleyTxBody
295
+ Cardano.Api. ShelleyTxBody
326
296
_
327
297
txBodyLedgerTxBody
328
298
txBodyScripts
@@ -331,7 +301,7 @@ pattern ShelleyTxBody
331
301
txBodyScriptValidity
332
302
where
333
303
ShelleyTxBody =
334
- Cardano.Api.Shelley. ShelleyTxBody shelleyBasedEra
304
+ Cardano.Api. ShelleyTxBody shelleyBasedEra
335
305
336
306
signShelleyTransaction :: TxBody -> [ShelleyWitnessSigningKey ] -> Tx
337
307
signShelleyTransaction = Cardano.Api. signShelleyTransaction shelleyBasedEra
@@ -600,25 +570,25 @@ pattern TxOut{txOutAddress, txOutValue, txOutDatum, txOutReferenceScript} <-
600
570
601
571
-- ** ReferenceScript
602
572
603
- type ReferenceScript = Cardano.Api.Shelley. ReferenceScript Era
573
+ type ReferenceScript = Cardano.Api. ReferenceScript Era
604
574
{-# COMPLETE ReferenceScript, ReferenceScriptNone #-}
605
575
606
576
pattern ReferenceScript :: ScriptInAnyLang -> ReferenceScript
607
577
pattern ReferenceScript {referenceScript} <-
608
- Cardano.Api.Shelley. ReferenceScript
578
+ Cardano.Api. ReferenceScript
609
579
_
610
580
referenceScript
611
581
where
612
582
ReferenceScript =
613
- Cardano.Api.Shelley. ReferenceScript
583
+ Cardano.Api. ReferenceScript
614
584
babbageBasedEra
615
585
616
- pattern ReferenceScriptNone :: Cardano.Api.Shelley. ReferenceScript Era
586
+ pattern ReferenceScriptNone :: Cardano.Api. ReferenceScript Era
617
587
pattern ReferenceScriptNone <-
618
- Cardano.Api.Shelley. ReferenceScriptNone
588
+ Cardano.Api. ReferenceScriptNone
619
589
where
620
590
ReferenceScriptNone =
621
- Cardano.Api.Shelley. ReferenceScriptNone
591
+ Cardano.Api. ReferenceScriptNone
622
592
623
593
-- ** TxOutDatum
624
594
@@ -729,3 +699,15 @@ pattern ScriptWitness scriptWitnessInCtx scriptWitness <-
729
699
730
700
makeShelleyKeyWitness :: TxBody -> ShelleyWitnessSigningKey -> KeyWitness
731
701
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