convex-base-0.2.0.0: Base classes and types for working with cardano-api transactions
Safe HaskellSafe-Inferred
LanguageHaskell2010

Convex.Utils

Description

Conversion functions and other conveniences

Synopsis

Documentation

scriptAddressNetworkIdPlutusScript PlutusScriptV2AddressInEra BabbageEra Source #

Script address without staking key

Plutus V1

scriptAddressV1NetworkIdPlutusScript PlutusScriptV1AddressInEra BabbageEra Source #

Script address without staking key

Serialised transactions

Dealing with errors

liftResultMonadError e m ⇒ (String → e) → ResultT m a → m a Source #

liftEitherMonadError e m ⇒ (ee → e) → m (Either ee a) → m a Source #

mapErrorMonadError e m ⇒ (ee → e) → ExceptT ee m a → m a Source #

failOnLeftMonadIO m ⇒ (e → String) → Either e a → m a Source #

failOnLeftLog ∷ (MonadLog m, MonadIO m) ⇒ (e → String) → Either e a → m a Source #

Reading key files

readSigningKeyFromFileFilePathIO (SigningKey PaymentKey) Source #

Read a serialised signing key from a file

readVerificationKeyFromFileFilePathIO (VerificationKey PaymentKey) Source #

Read a serialised verification key from a file. Try bech32 encoding first, then text envelope (JSON)

readStakingKeyFromFileFilePathIO (VerificationKey StakeKey) Source #

Read a serialised signing key from a file

Etc.

extractTx ∷ ∀ m. MonadIO m ⇒ Set TxIdBlockInMode CardanoMode → m () Source #

Search for interesting transactions in a block and serialise them to JSON files

txnUtxosTx era → [(TxIn, TxOut CtxTx era)] Source #

The UTxOs produced by the transaction

slotToUtcTimeEraHistory mode → SystemStartSlotNoEither String UTCTime Source #

Convert a slot number to UTC time

utcTimeToSlotEraHistory mode → SystemStartUTCTimeEither String (SlotNo, NominalDiffTime, NominalDiffTime) Source #

Convert a UTC time to slot no. Returns the time spent and time left in this slot.

utcTimeToSlotUnsafeEraHistory mode → SystemStartUTCTimeEither String (SlotNo, NominalDiffTime, NominalDiffTime) Source #

Convert a UTC time to slot no. Returns the time spent and time left in this slot. Extends the interpreter range to infinity before running the query, ignoring any future hard forks. This avoids horizon errors for times that are in the future. It may still fail for times that are in the past (before the beginning of the horizin)

posixTimeToSlotEraHistory mode → SystemStartPOSIXTimeEither String (SlotNo, NominalDiffTime, NominalDiffTime) Source #

Convert a POSIXTime to slot no. Returns the time spent and time left in this slot.

posixTimeToSlotUnsafeEraHistory mode → SystemStartPOSIXTimeEither String (SlotNo, NominalDiffTime, NominalDiffTime) Source #

Convert a POSIXTime to slot no. Returns the time spent and time left in this slot.