cardano-api
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Genesis

Synopsis

Documentation

data ShelleyGenesis Source #

Shelley genesis information

Note that this is needed only for a pure Shelley network, hence it being defined here rather than in its own module. In mainnet, Shelley will transition naturally from Byron, and thus will never have its own genesis information.

Constructors

ShelleyGenesis 

Fields

Instances

Instances details
FromJSON ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Methods

parseJSON :: Value -> Parser ShelleyGenesis #

parseJSONList :: Value -> Parser [ShelleyGenesis] #

omittedField :: Maybe ShelleyGenesis #

ToJSON ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

FromCBOR ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

ToCBOR ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

DecCBOR ShelleyGenesis Source #

Genesis are always encoded with the version of era they are defined in.

Instance details

Defined in Cardano.Ledger.Shelley.Genesis

EncCBOR ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

ToKeyValuePairs ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Methods

toKeyValuePairs :: KeyValue e kv => ShelleyGenesis -> [kv] Source #

NFData ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Methods

rnf :: ShelleyGenesis -> () Source #

Generic ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Associated Types

type Rep ShelleyGenesis 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep ShelleyGenesis = D1 ('MetaData "ShelleyGenesis" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.17.0.0-8e14283c15bc91bd3f0b85771c7cee64dfa0626b22db973e40e4d97419c57431" 'False) (C1 ('MetaCons "ShelleyGenesis" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sgSystemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "sgNetworkMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32) :*: S1 ('MetaSel ('Just "sgNetworkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network))) :*: ((S1 ('MetaSel ('Just "sgActiveSlotsCoeff") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositiveUnitInterval) :*: S1 ('MetaSel ('Just "sgSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (NonZero Word64))) :*: (S1 ('MetaSel ('Just "sgEpochLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochSize) :*: S1 ('MetaSel ('Just "sgSlotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64)))) :*: (((S1 ('MetaSel ('Just "sgMaxKESEvolutions") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgSlotLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTimeMicro)) :*: (S1 ('MetaSel ('Just "sgUpdateQuorum") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgMaxLovelaceSupply") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just "sgProtocolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams ShelleyEra)) :*: S1 ('MetaSel ('Just "sgGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'Genesis) GenDelegPair))) :*: (S1 ('MetaSel ('Just "sgInitialFunds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap Addr Coin)) :*: S1 ('MetaSel ('Just "sgStaking") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShelleyGenesisStaking))))))
Show ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Eq ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

NoThunks ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Methods

noThunks :: Context -> ShelleyGenesis -> IO (Maybe ThunkInfo) #

wNoThunks :: Context -> ShelleyGenesis -> IO (Maybe ThunkInfo) #

showTypeOf :: Proxy ShelleyGenesis -> String #

type Rep ShelleyGenesis Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep ShelleyGenesis = D1 ('MetaData "ShelleyGenesis" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.17.0.0-8e14283c15bc91bd3f0b85771c7cee64dfa0626b22db973e40e4d97419c57431" 'False) (C1 ('MetaCons "ShelleyGenesis" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sgSystemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "sgNetworkMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32) :*: S1 ('MetaSel ('Just "sgNetworkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network))) :*: ((S1 ('MetaSel ('Just "sgActiveSlotsCoeff") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositiveUnitInterval) :*: S1 ('MetaSel ('Just "sgSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (NonZero Word64))) :*: (S1 ('MetaSel ('Just "sgEpochLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochSize) :*: S1 ('MetaSel ('Just "sgSlotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64)))) :*: (((S1 ('MetaSel ('Just "sgMaxKESEvolutions") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgSlotLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTimeMicro)) :*: (S1 ('MetaSel ('Just "sgUpdateQuorum") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgMaxLovelaceSupply") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just "sgProtocolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams ShelleyEra)) :*: S1 ('MetaSel ('Just "sgGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'Genesis) GenDelegPair))) :*: (S1 ('MetaSel ('Just "sgInitialFunds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap Addr Coin)) :*: S1 ('MetaSel ('Just "sgStaking") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShelleyGenesisStaking))))))

shelleyGenesisDefaults :: ShelleyGenesis Source #

Some reasonable starting defaults for constructing a ShelleyGenesis.

You must override at least the following fields for this to be useful:

Configuration

Files

Protocol parameters fixed in the genesis file

data GenesisParameters era Source #

Constructors

GenesisParameters 

Fields

newtype EpochSize Source #

Constructors

EpochSize 

Fields

Instances

Instances details
FromJSON EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

parseJSON :: Value -> Parser EpochSize #

parseJSONList :: Value -> Parser [EpochSize] #

omittedField :: Maybe EpochSize #

ToJSON EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toJSON :: EpochSize -> Value #

toEncoding :: EpochSize -> Encoding #

toJSONList :: [EpochSize] -> Value #

toEncodingList :: [EpochSize] -> Encoding #

omitField :: EpochSize -> Bool #

FromCBOR EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR :: EpochSize -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy EpochSize -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [EpochSize] -> Size Source #

DecCBOR EpochSize Source # 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochSize Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf :: EpochSize -> () Source #

Enum EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.0.1-a8d1f309920f051928abdd49f98709a0187ae00b0805d8caaf81e53a9c7d0998" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))
Show EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks :: Context -> EpochSize -> IO (Maybe ThunkInfo) #

wNoThunks :: Context -> EpochSize -> IO (Maybe ThunkInfo) #

showTypeOf :: Proxy EpochSize -> String #

type Rep EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.0.1-a8d1f309920f051928abdd49f98709a0187ae00b0805d8caaf81e53a9c7d0998" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

Utilities

unsafeBoundedRational :: (HasCallStack, Typeable r, BoundedRational r) => Rational -> r Source #

Convert Rational to a bounded rational. Throw an exception when the rational is out of bounds.