cardano-crypto-wrapper-1.5.1.3: Cryptographic primitives used in Byron era of the Cardano project
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Crypto.ProtocolMagic

Synopsis

Documentation

newtype ProtocolMagicId Source #

Constructors

ProtocolMagicId 

Instances

Instances details
FromJSON ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToJSON ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Generic ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Associated Types

type Rep ProtocolMagicIdTypeType Source #

Show ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

FromCBOR ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToCBOR ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

DecCBOR ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

EncCBOR ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

NFData ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Methods

rnfProtocolMagicId → () Source #

Eq ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

NoThunks ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

MonadError SchemaError m ⇒ FromJSON m ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Monad m ⇒ ToJSON m ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

type Rep ProtocolMagicId Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

type Rep ProtocolMagicId = D1 ('MetaData "ProtocolMagicId" "Cardano.Crypto.ProtocolMagic" "cardano-crypto-wrapper-1.5.1.3-inplace" 'True) (C1 ('MetaCons "ProtocolMagicId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unProtocolMagicId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

data AProtocolMagic a Source #

Magic number which should differ for different clusters. It's defined here, because it's used for signing. It also used for other things (e. g. it's part of a serialized block).

mhueschen: As part of CO-353 I am adding getRequiresNetworkMagic in order to pipe configuration to functions which must generate & verify Addresses (which now must be aware of NetworkMagic).

Instances

Instances details
FromJSON ProtocolMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToJSON ProtocolMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Generic (AProtocolMagic a) Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Associated Types

type Rep (AProtocolMagic a) ∷ TypeType Source #

Show a ⇒ Show (AProtocolMagic a) Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

NFData a ⇒ NFData (AProtocolMagic a) Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Methods

rnfAProtocolMagic a → () Source #

Eq a ⇒ Eq (AProtocolMagic a) Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

NoThunks a ⇒ NoThunks (AProtocolMagic a) Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

type Rep (AProtocolMagic a) Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

type Rep (AProtocolMagic a) = D1 ('MetaData "AProtocolMagic" "Cardano.Crypto.ProtocolMagic" "cardano-crypto-wrapper-1.5.1.3-inplace" 'False) (C1 ('MetaCons "AProtocolMagic" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAProtocolMagicId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Annotated ProtocolMagicId a)) :*: S1 ('MetaSel ('Just "getRequiresNetworkMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RequiresNetworkMagic)))

data RequiresNetworkMagic Source #

Bool-isomorphic flag indicating whether we're on testnet or mainnet/staging.

Instances

Instances details
FromJSON RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToJSON RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Generic RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Associated Types

type Rep RequiresNetworkMagicTypeType Source #

Show RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

FromCBOR RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToCBOR RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

DecCBOR RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

EncCBOR RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

NFData RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Methods

rnfRequiresNetworkMagic → () Source #

Eq RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

NoThunks RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

MonadError SchemaError m ⇒ FromJSON m RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

Monad m ⇒ ToJSON m RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

type Rep RequiresNetworkMagic Source # 
Instance details

Defined in Cardano.Crypto.ProtocolMagic

type Rep RequiresNetworkMagic = D1 ('MetaData "RequiresNetworkMagic" "Cardano.Crypto.ProtocolMagic" "cardano-crypto-wrapper-1.5.1.3-inplace" 'False) (C1 ('MetaCons "RequiresNoMagic" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "RequiresMagic" 'PrefixI 'False) (U1TypeType))