hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Node.Util

Synopsis

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) 

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.