cardano-api:internal
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Keys.Read

Synopsis

Documentation

readKeyFile :: AsType a -> NonEmpty (InputFormat a) -> FilePath -> IO (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.

readKeyFileTextEnvelope :: HasTextEnvelope a => AsType a -> File content 'In -> IO (Either (FileError InputDecodeError) a) Source #

Read a cryptographic key from a file.

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

readKeyFileAnyOf :: forall content b. [FromSomeType SerialiseAsBech32 b] -> [FromSomeType HasTextEnvelope b] -> File content 'In -> IO (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.