Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.CLI.Byron.Key
Synopsis
- data ByronKeyFailure
- newtype NewSigningKeyFile = NewSigningKeyFile FilePath
- newtype NewVerificationKeyFile = NewVerificationKeyFile FilePath
- newtype VerificationKeyFile = VerificationKeyFile {}
- data CardanoEra
- serialiseSigningKey :: CardanoEra -> SigningKey -> Either ByronKeyFailure ByteString
- deserialiseSigningKey :: CardanoEra -> FilePath -> ByteString -> Either ByronKeyFailure SigningKey
- keygen :: PassPhrase -> IO SigningKey
- prettyPublicKey :: VerificationKey -> Text
- readEraSigningKey :: CardanoEra -> SigningKeyFile -> ExceptT ByronKeyFailure IO SigningKey
- readPaymentVerificationKey :: VerificationKeyFile -> ExceptT ByronKeyFailure IO VerificationKey
- renderByronKeyFailure :: ByronKeyFailure -> Text
- serialisePoorKey :: CardanoEra -> PoorSecret -> Either ByronKeyFailure ByteString
- data PasswordRequirement
- type PasswordPrompt = String
- getPassphrase :: PasswordPrompt -> PasswordRequirement -> IO PassPhrase
Keys
data ByronKeyFailure Source #
Constructors
ReadSigningKeyFailure !FilePath !Text | |
ReadVerificationKeyFailure !FilePath !Text | |
SigningKeyDeserialisationFailed !FilePath !DeserialiseFailure | |
VerificationKeyDeserialisationFailed !FilePath !Text |
Instances
Show ByronKeyFailure Source # | |
Defined in Cardano.CLI.Byron.Key Methods showsPrec :: Int -> ByronKeyFailure -> ShowS # show :: ByronKeyFailure -> String # showList :: [ByronKeyFailure] -> ShowS # |
newtype NewSigningKeyFile Source #
Constructors
NewSigningKeyFile FilePath |
Instances
Eq NewSigningKeyFile Source # | |
Defined in Cardano.CLI.Byron.Key Methods (==) :: NewSigningKeyFile -> NewSigningKeyFile -> Bool # (/=) :: NewSigningKeyFile -> NewSigningKeyFile -> Bool # | |
Ord NewSigningKeyFile Source # | |
Defined in Cardano.CLI.Byron.Key Methods compare :: NewSigningKeyFile -> NewSigningKeyFile -> Ordering # (<) :: NewSigningKeyFile -> NewSigningKeyFile -> Bool # (<=) :: NewSigningKeyFile -> NewSigningKeyFile -> Bool # (>) :: NewSigningKeyFile -> NewSigningKeyFile -> Bool # (>=) :: NewSigningKeyFile -> NewSigningKeyFile -> Bool # max :: NewSigningKeyFile -> NewSigningKeyFile -> NewSigningKeyFile # min :: NewSigningKeyFile -> NewSigningKeyFile -> NewSigningKeyFile # | |
Show NewSigningKeyFile Source # | |
Defined in Cardano.CLI.Byron.Key Methods showsPrec :: Int -> NewSigningKeyFile -> ShowS # show :: NewSigningKeyFile -> String # showList :: [NewSigningKeyFile] -> ShowS # | |
IsString NewSigningKeyFile Source # | |
Defined in Cardano.CLI.Byron.Key Methods fromString :: String -> NewSigningKeyFile # |
newtype NewVerificationKeyFile Source #
Constructors
NewVerificationKeyFile FilePath |
Instances
newtype VerificationKeyFile Source #
Constructors
VerificationKeyFile | |
Fields |
Instances
Eq VerificationKeyFile Source # | |
Defined in Cardano.CLI.Types Methods (==) :: VerificationKeyFile -> VerificationKeyFile -> Bool # (/=) :: VerificationKeyFile -> VerificationKeyFile -> Bool # | |
Show VerificationKeyFile Source # | |
Defined in Cardano.CLI.Types Methods showsPrec :: Int -> VerificationKeyFile -> ShowS # show :: VerificationKeyFile -> String # showList :: [VerificationKeyFile] -> ShowS # |
data CardanoEra Source #
Some commands have variants or file formats that depend on the era.
TODO: this looks like it's only used for Byron era keys, so could be renamed
Constructors
ByronEraLegacy | |
ByronEra |
Instances
Show CardanoEra Source # | |
Defined in Cardano.CLI.Byron.Key Methods showsPrec :: Int -> CardanoEra -> ShowS # show :: CardanoEra -> String # showList :: [CardanoEra] -> ShowS # |
deserialiseSigningKey :: CardanoEra -> FilePath -> ByteString -> Either ByronKeyFailure SigningKey Source #
keygen :: PassPhrase -> IO SigningKey Source #
Generate a cryptographically random signing key, protected with a (potentially empty) passphrase.
prettyPublicKey :: VerificationKey -> Text Source #
Print some invariant properties of a public key: its hash and formatted view.
readEraSigningKey :: CardanoEra -> SigningKeyFile -> ExceptT ByronKeyFailure IO SigningKey Source #
Read signing key from a file. Throw an error if the file can't be read or fails to deserialise.
readPaymentVerificationKey :: VerificationKeyFile -> ExceptT ByronKeyFailure IO VerificationKey Source #
Read verification key from a file. Throw an error if the file can't be read or the key fails to deserialise.
Passwords
data PasswordRequirement Source #
Whether to require a password, or to supply an empty one.
Constructors
GetPassword | |
EmptyPassword |
Instances
Eq PasswordRequirement Source # | |
Defined in Cardano.CLI.Byron.Key Methods (==) :: PasswordRequirement -> PasswordRequirement -> Bool # (/=) :: PasswordRequirement -> PasswordRequirement -> Bool # | |
Show PasswordRequirement Source # | |
Defined in Cardano.CLI.Byron.Key Methods showsPrec :: Int -> PasswordRequirement -> ShowS # show :: PasswordRequirement -> String # showList :: [PasswordRequirement] -> ShowS # |
type PasswordPrompt = String Source #
getPassphrase :: PasswordPrompt -> PasswordRequirement -> IO PassPhrase Source #
Get a passphrase from the standard input, depending on whether it's required.