Skip to content

Commit cf7de94

Browse files
Add Cardano.Api.Tx.UTxO.resolve
1 parent 2f4048c commit cf7de94

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cardano-api/src/Cardano/Api/Internal/Tx/UTxO.hs

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ singleton i o = UTxO $ Map.singleton i o
7474
lookup :: TxIn -> UTxO era -> Maybe (TxOut CtxUTxO era)
7575
lookup k = Map.lookup k . unUTxO
7676

77+
-- | Synonym for `lookup`.
78+
resolve :: TxIn -> UTxO era -> Maybe (TxOut CtxUTxO era)
79+
resolve = Cardano.Api.Internal.Tx.UTxO.lookup
80+
7781
-- | Filter all `TxOut` that satisfy the predicate.
7882
filter :: (TxOut CtxUTxO era -> Bool) -> UTxO era -> UTxO era
7983
filter fn = UTxO . Map.filter fn . unUTxO

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

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Cardano.Api.Tx.UTxO
33
, UTxO.empty
44
, UTxO.singleton
55
, UTxO.lookup
6+
, UTxO.resolve
67
, UTxO.filter
78
, UTxO.filterWithKey
89
, UTxO.inputSet

0 commit comments

Comments
 (0)