File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
cardano-api/src/Cardano/Api Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ module Cardano.Api.Experimental
5353 , SimpleScript (.. )
5454 , SimpleScriptOrReferenceInput (.. )
5555 , deserialiseSimpleScript
56+ , hashSimpleScript
5657
5758 -- ** Plutus related
5859 , PlutusScriptInEra (.. )
Original file line number Diff line number Diff line change 44{-# LANGUAGE StandaloneDeriving #-}
55{-# LANGUAGE TypeApplications #-}
66{-# LANGUAGE TypeFamilies #-}
7+ {-# LANGUAGE TypeOperators #-}
78{-# LANGUAGE UndecidableInstances #-}
89
910module Cardano.Api.Experimental.Simple.Script
1011 ( SimpleScript (.. )
1112 , SimpleScriptOrReferenceInput (.. )
1213 , deserialiseSimpleScript
14+ , hashSimpleScript
1315 )
1416where
1517
@@ -56,6 +58,10 @@ deserialiseSimpleScript
5658deserialiseSimpleScript bs =
5759 deserialiseFromCBOR (proxyToAsType (Proxy @ (SimpleScript era ))) bs
5860
61+ hashSimpleScript
62+ :: L. NativeScript era ~ L. Script era => SimpleScript era -> L. ScriptHash
63+ hashSimpleScript (SimpleScript ns) = L. hashScript ns
64+
5965data SimpleScriptOrReferenceInput era
6066 = SScript (SimpleScript era )
6167 | SReferenceScript TxIn
You can’t perform that action at this time.
0 commit comments