module Byron.Spec.Ledger.Core.Omniscient where
import Byron.Spec.Ledger.Core (
SKey (SKey),
Sig (Sig),
VKey (VKey),
VKeyGenesis,
owner,
sign,
unVKeyGenesis,
)
signatureVKey :: Sig a -> VKey
signatureVKey :: forall a. Sig a -> VKey
signatureVKey (Sig a
_someData Owner
someOwner) = Owner -> VKey
VKey Owner
someOwner
signatureData :: Sig a -> a
signatureData :: forall a. Sig a -> a
signatureData (Sig a
someData Owner
_someOwner) = a
someData
skey :: VKey -> SKey
skey :: VKey -> SKey
skey = Owner -> SKey
SKey forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. HasOwner a => a -> Owner
owner
signWithGenesisKey :: VKeyGenesis -> a -> Sig a
signWithGenesisKey :: forall a. VKeyGenesis -> a -> Sig a
signWithGenesisKey VKeyGenesis
vkg = forall a. SKey -> a -> Sig a
sign (VKey -> SKey
skey (VKeyGenesis -> VKey
unVKeyGenesis VKeyGenesis
vkg))