| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Node.Util
Synopsis
- newtype KeyFileError = KeyFileError (FileError TextEnvelopeError)
- readKeyPair :: FilePath -> IO (VerificationKey PaymentKey, Secret CardanoSigningKey)
- readSigningKey :: FilePath -> IO CardanoSigningKey
- readVerificationKey :: FilePath -> IO (VerificationKey PaymentKey)
- readFileTextEnvelopeThrow :: HasTextEnvelope a => FilePath -> IO a
- checkNonADAAssetsUTxO :: UTxO -> Either Value ()
Documentation
newtype KeyFileError Source #
Thrown when a cardano key file could not be read as any of the accepted text envelope formats.
Constructors
| KeyFileError (FileError TextEnvelopeError) |
Instances
| Exception KeyFileError Source # | |
Defined in Hydra.Node.Util Methods toException :: KeyFileError -> SomeException Source # fromException :: SomeException -> Maybe KeyFileError Source # | |
| Show KeyFileError Source # | |
Defined in Hydra.Node.Util | |
readKeyPair :: FilePath -> IO (VerificationKey PaymentKey, Secret CardanoSigningKey) Source #
Read a cardano signing key pair from a text envelope file, accepting both
normal (PaymentKey) and extended (PaymentExtendedKey) key formats.
Returns the verification key (always as 'VerificationKey PaymentKey') and
the signing key wrapped in CardanoSigningKey inside Secret.
readSigningKey :: FilePath -> IO CardanoSigningKey Source #
Read a CardanoSigningKey from a text envelope file, accepting both
normal (PaymentKey) and extended (PaymentExtendedKey) key formats.
Extended keys are kept native (not converted) to preserve correct signing.
Throws KeyFileError listing both accepted formats if neither matches.
readVerificationKey :: FilePath -> IO (VerificationKey PaymentKey) Source #
Read a 'VerificationKey PaymentKey' from a text envelope file, accepting
both normal (PaymentKey) and extended (PaymentExtendedKey) key formats.
Extended keys are converted using castVerificationKey.
Throws KeyFileError listing both accepted formats if neither matches.
readFileTextEnvelopeThrow :: HasTextEnvelope a => FilePath -> IO a Source #
checkNonADAAssetsUTxO :: UTxO -> Either Value () Source #
Filter and return any non-ADA assets as Left if they are present in the UTxO value.