Skip to content
Browse files

Add: 'HasSignTag' instances for the most useful types.

There are others, but they largely relate to updates (can be ignored for now)
and VSS (not going to be used).
  • Loading branch information...
nc6 committed May 15, 2019
1 parent 0185d57 commit 0f55b877f201c0cb9b374ec3f3a01ec7ae662343
Showing with 13 additions and 1 deletion.
  1. +13 −1 ouroboros-consensus/src/Ouroboros/Consensus/Crypto/DSIGN/Cardano.hs
@@ -14,9 +14,12 @@ module Ouroboros.Consensus.Crypto.DSIGN.Cardano
) where

import Cardano.Binary
import qualified Cardano.Chain.Block as CC.Block
import qualified Cardano.Chain.Txp as CC.Txp
import Cardano.Crypto
( ProtocolMagicId
, SignTag
, ProxyVerificationKey
, SignTag(..)
, PublicKey
, Signature
, SecretKey
@@ -38,6 +41,15 @@ pm = undefined
class HasSignTag a where
signTag :: a -> SignTag

instance HasSignTag CC.Txp.TxSigData where
signTag = const SignTx

instance HasSignTag CC.Block.ToSign where
signTag = const SignMainBlock

instance HasSignTag (ProxyVerificationKey w) where
signTag = const SignProxyVK

data CardanoDSIGN

instance DSIGNAlgorithm CardanoDSIGN where

0 comments on commit 0f55b87

Please sign in to comment.
You can’t perform that action at this time.