cardano-cli-1.36.0
Safe HaskellNone
LanguageHaskell2010

Cardano.CLI.Shelley.Key

Description

Shelley CLI option data types and functions for cryptographic keys.

Synopsis

Documentation

readKeyFileAsType a → NonEmpty (InputFormat a) → FilePathIO (Either (FileError InputDecodeError) a) Source #

Read a cryptographic key from a file.

The contents of the file can either be Bech32-encoded, hex-encoded, or in the text envelope format.

readKeyFileAnyOf ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → [FromSomeType HasTextEnvelope b] → FilePathIO (Either (FileError InputDecodeError) b) Source #

Read a cryptographic key from a file given that it is one of the provided types.

The contents of the file can either be Bech32-encoded or in the text envelope format.

readKeyFileTextEnvelopeHasTextEnvelope a ⇒ AsType a → FilePathIO (Either (FileError InputDecodeError) a) Source #

Read a cryptographic key from a file.

The contents of the file must be in the text envelope format.

readSigningKeyFile ∷ ∀ keyrole. (HasTextEnvelope (SigningKey keyrole), SerialiseAsBech32 (SigningKey keyrole)) ⇒ AsType keyrole → SigningKeyFileIO (Either (FileError InputDecodeError) (SigningKey keyrole)) Source #

Read a signing key from a file.

The contents of the file can either be Bech32-encoded, hex-encoded, or in the text envelope format.

readSigningKeyFileAnyOf ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → [FromSomeType HasTextEnvelope b] → SigningKeyFileIO (Either (FileError InputDecodeError) b) Source #

Read a signing key from a file given that it is one of the provided types of signing key.

The contents of the file can either be Bech32-encoded or in the text envelope format.

data VerificationKeyOrFile keyrole Source #

Either a verification key or path to a verification key file.

Constructors

VerificationKeyValue !(VerificationKey keyrole)

A verification key.

VerificationKeyFilePath !VerificationKeyFile

A path to a verification key file. Note that this file hasn't been validated at all (whether it exists, contains a key of the correct type, etc.)

Instances

Instances details
Eq (VerificationKey keyrole) ⇒ Eq (VerificationKeyOrFile keyrole) Source # 
Instance details

Defined in Cardano.CLI.Shelley.Key

Show (VerificationKey keyrole) ⇒ Show (VerificationKeyOrFile keyrole) Source # 
Instance details

Defined in Cardano.CLI.Shelley.Key

readVerificationKeyOrFile ∷ (HasTextEnvelope (VerificationKey keyrole), SerialiseAsBech32 (VerificationKey keyrole)) ⇒ AsType keyrole → VerificationKeyOrFile keyrole → IO (Either (FileError InputDecodeError) (VerificationKey keyrole)) Source #

Read a verification key or verification key file and return a verification key.

If a filepath is provided, the file can either be formatted as Bech32, hex, or text envelope.

readVerificationKeyOrTextEnvFileHasTextEnvelope (VerificationKey keyrole) ⇒ AsType keyrole → VerificationKeyOrFile keyrole → IO (Either (FileError InputDecodeError) (VerificationKey keyrole)) Source #

Read a verification key or verification key file and return a verification key.

If a filepath is provided, it will be interpreted as a text envelope formatted file.

readVerificationKeyTextOrFileAnyOfVerificationKeyTextOrFileIO (Either VerificationKeyTextOrFileError SomeAddressVerificationKey) Source #

Deserialise a verification key from text or a verification key file. If a filepath is provided, the file can either be formatted as Bech32, hex, or text envelope.

data VerificationKeyOrHashOrFile keyrole Source #

Verification key, verification key hash, or path to a verification key file.

Constructors

VerificationKeyOrFile !(VerificationKeyOrFile keyrole)

Either a verification key or path to a verification key file.

VerificationKeyHash !(Hash keyrole)

A verification key hash.

Instances

Instances details
(Eq (VerificationKeyOrFile keyrole), Eq (Hash keyrole)) ⇒ Eq (VerificationKeyOrHashOrFile keyrole) Source # 
Instance details

Defined in Cardano.CLI.Shelley.Key

(Show (VerificationKeyOrFile keyrole), Show (Hash keyrole)) ⇒ Show (VerificationKeyOrHashOrFile keyrole) Source # 
Instance details

Defined in Cardano.CLI.Shelley.Key

readVerificationKeyOrHashOrFile ∷ (Key keyrole, SerialiseAsBech32 (VerificationKey keyrole)) ⇒ AsType keyrole → VerificationKeyOrHashOrFile keyrole → IO (Either (FileError InputDecodeError) (Hash keyrole)) Source #

Read a verification key or verification key hash or verification key file and return a verification key hash.

If a filepath is provided, the file can either be formatted as Bech32, hex, or text envelope.

readVerificationKeyOrHashOrTextEnvFileKey keyrole ⇒ AsType keyrole → VerificationKeyOrHashOrFile keyrole → IO (Either (FileError InputDecodeError) (Hash keyrole)) Source #

Read a verification key or verification key hash or verification key file and return a verification key hash.

If a filepath is provided, it will be interpreted as a text envelope formatted file.

generateKeyPairKey keyrole ⇒ AsType keyrole → IO (VerificationKey keyrole, SigningKey keyrole) Source #