1111module Cardano.Ledger.Keys.WitVKey (
1212 WitVKey (WitVKey ),
1313 witVKeyHash ,
14+ wvkSig ,
1415)
1516where
1617
@@ -43,13 +44,17 @@ import NoThunks.Class (AllowThunksIn (..), NoThunks (..))
4344-- | Proof/Witness that a transaction is authorized by the given key holder.
4445data WitVKey kr = WitVKeyInternal
4546 { wvkKey :: ! (VKey kr )
46- , wvkSig :: ! (SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody ))
47+ , wvkSignature :: ! (SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody ))
4748 , wvkKeyHash :: KeyHash 'Witness
4849 -- ^ Hash of the witness vkey. We store this here to avoid repeated hashing
4950 -- when used in ordering.
5051 }
5152 deriving (Generic , Show , Eq )
5253
54+ wvkSig :: WitVKey kr -> SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody )
55+ wvkSig = wvkSignature
56+ {-# DEPRECATED wvkSig "In favor of `wvkSignature`" #-}
57+
5358deriving via
5459 AllowThunksIn '[" wvkKeyHash" ] (WitVKey kr)
5560 instance
@@ -68,13 +73,13 @@ instance Typeable kr => Ord (WitVKey kr) where
6873 -- have two WitVKeys in a same Set for different transactions. Therefore
6974 -- comparison on signatures is unlikely to happen and is only needed for
7075 -- compliance with Ord laws.
71- comparing wvkKeyHash x y <> comparing (hashTxBodySignature . wvkSig ) x y
76+ comparing wvkKeyHash x y <> comparing (hashTxBodySignature . wvkSignature ) x y
7277
7378instance Typeable kr => Plain. ToCBOR (WitVKey kr ) where
74- toCBOR WitVKeyInternal {wvkKey, wvkSig } =
79+ toCBOR WitVKeyInternal {wvkKey, wvkSignature } =
7580 Plain. encodeListLen 2
7681 <> Plain. toCBOR wvkKey
77- <> encodeSignedDSIGN wvkSig
82+ <> encodeSignedDSIGN wvkSignature
7883
7984instance Typeable kr => Plain. FromCBOR (WitVKey kr ) where
8085 fromCBOR =
0 commit comments