hydra-cardano-api-0.16.0: A Haskell API for Cardano, tailored to the Hydra project.
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Cardano.Api.Tx

Synopsis

Extras

convertConwayTx :: Tx ConwayEra -> Tx BabbageEra Source #

Explicit downgrade from Conway to Babbage era.

NOTE: This is not a complete mapping and does silently drop things like protocol updates, certificates and voting procedures.

signTx :: IsShelleyBasedEra era => SigningKey PaymentKey -> Tx era -> Tx era Source #

Sign transaction using the provided secret key It only works for tx not containing scripts. You can't sign a script utxo with this.

utxoProducedByTx :: Tx Era -> UTxO Source #

Get the UTxO that are produced by some transaction. XXX: Defined here to avoid cyclic module dependency

txFee' :: Tx era -> Coin Source #

Get explicit fees allocated to a transaction.

Type Conversions

toLedgerTx :: forall era. (EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto, AlonzoEraTx (ShelleyLedgerEra era)) => Tx era -> Tx (ShelleyLedgerEra era) Source #

Convert a cardano-api Tx into a matching cardano-ledger Tx.

fromLedgerTx :: Tx (ShelleyLedgerEra Era) -> Tx Era Source #

Convert a cardano-ledger's Tx in the Babbage era into a cardano-api Tx.