Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ColeGenesisError
- = ColeDelegationCertSerializationError !ColeDelegationError
- | ColeDelegationKeySerializationError ColeDelegationError
- | GenesisGenerationError !GenesisDataGenerationError
- | GenesisOutputDirAlreadyExists FilePath
- | GenesisReadError !FilePath !GenesisDataError
- | GenesisSpecError !Text
- | MakeGenesisDelegationError !GenesisDelegationError
- | NoGenesisDelegationForKey !Text
- | ProtocolParametersParseFailed !FilePath !Text
- | PoorKeyFailure !ColeKeyFailure
- data GenesisParameters = GenesisParameters {
- gpStartTime ∷ !UTCTime
- gpProtocolParamsFile ∷ !FilePath
- gpK ∷ !BlockCount
- gpProtocolMagic ∷ !ProtocolMagic
- gpTestnetBalance ∷ !TestnetBalanceOptions
- gpFakeAvvmOptions ∷ !FakeAvvmOptions
- gpAvvmBalanceFactor ∷ !EntropicPortion
- gpSeed ∷ !(Maybe Integer)
- newtype NewDirectory = NewDirectory FilePath
- dumpGenesis ∷ NewDirectory → GenesisData → GeneratedSecrets → ExceptT ColeGenesisError IO ()
- mkGenesis ∷ GenesisParameters → ExceptT ColeGenesisError IO (GenesisData, GeneratedSecrets)
- readGenesis ∷ GenesisFile → NetworkId → ExceptT ColeGenesisError IO Config
- renderColeGenesisError ∷ ColeGenesisError → Text
Documentation
data ColeGenesisError Source #
ColeDelegationCertSerializationError !ColeDelegationError | |
ColeDelegationKeySerializationError ColeDelegationError | |
GenesisGenerationError !GenesisDataGenerationError | |
GenesisOutputDirAlreadyExists FilePath | |
GenesisReadError !FilePath !GenesisDataError | |
GenesisSpecError !Text | |
MakeGenesisDelegationError !GenesisDelegationError | |
NoGenesisDelegationForKey !Text | |
ProtocolParametersParseFailed !FilePath !Text | |
PoorKeyFailure !ColeKeyFailure |
Instances
Show ColeGenesisError Source # | |
Defined in Bcc.CLI.Cole.Genesis |
data GenesisParameters Source #
Parameters required for generation of new genesis.
GenesisParameters | |
|
Instances
Show GenesisParameters Source # | |
Defined in Bcc.CLI.Cole.Genesis |
newtype NewDirectory Source #
Instances
Eq NewDirectory Source # | |
Defined in Bcc.CLI.Cole.Genesis (==) ∷ NewDirectory → NewDirectory → Bool Source # (/=) ∷ NewDirectory → NewDirectory → Bool Source # | |
Ord NewDirectory Source # | |
Defined in Bcc.CLI.Cole.Genesis compare ∷ NewDirectory → NewDirectory → Ordering Source # (<) ∷ NewDirectory → NewDirectory → Bool Source # (<=) ∷ NewDirectory → NewDirectory → Bool Source # (>) ∷ NewDirectory → NewDirectory → Bool Source # (>=) ∷ NewDirectory → NewDirectory → Bool Source # | |
Show NewDirectory Source # | |
Defined in Bcc.CLI.Cole.Genesis | |
IsString NewDirectory Source # | |
Defined in Bcc.CLI.Cole.Genesis |
dumpGenesis ∷ NewDirectory → GenesisData → GeneratedSecrets → ExceptT ColeGenesisError IO () Source #
Write out genesis into a directory that must not yet exist. An error is thrown if the directory already exists, or the genesis has delegate keys that are not delegated to.
mkGenesis ∷ GenesisParameters → ExceptT ColeGenesisError IO (GenesisData, GeneratedSecrets) Source #
Generate a genesis, for given blockchain start time, protocol parameters, security parameter, protocol magic, testnet balance options, fake AVVM options, AVVM balance factor and seed. Throw an error in the following cases: if the protocol parameters file can't be read or fails parse, if genesis delegation couldn't be generated, if the parameter-derived genesis specification is wrong, or if the genesis fails generation.
readGenesis ∷ GenesisFile → NetworkId → ExceptT ColeGenesisError IO Config Source #
Read genesis from a file.