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

Hydra.Cardano.Api.Tx

Synopsis

Extras

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.

txSpendingUTxO :: UTxO -> Tx Era Source #

Create a transaction spending all given UTxO.

fromLedgerTx :: IsShelleyBasedEra era => Tx (ShelleyLedgerEra era) -> Tx era Source #

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

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.

toLedgerTx :: Tx era -> Tx (ShelleyLedgerEra era) Source #

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

recomputeIntegrityHash :: (AlonzoEraPParams ppera, AlonzoEraTxWits txera, AlonzoEraTxBody txera, EraTx txera) => PParams ppera -> [Language] -> Tx txera -> Tx txera Source #

Compute the integrity hash of a transaction using a list of plutus languages.

convertConwayTx :: Tx Conway -> Tx Babbage Source #

Explicit downgrade from Conway to Babbage era.

XXX: This will invalidate the script integrity hash as datums and redeemers are serialized differently.

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

Re-export normal Tx (any era)

data Tx era #

Instances

Instances details
Show (InAnyShelleyBasedEra Tx) 
Instance details

Defined in Cardano.Api.Tx.Sign

Show (InAnyCardanoEra Tx) 
Instance details

Defined in Cardano.Api.Tx.Sign

Show (Tx era) 
Instance details

Defined in Cardano.Api.Tx.Sign

Methods

showsPrec :: Int -> Tx era -> ShowS Source #

show :: Tx era -> String Source #

showList :: [Tx era] -> ShowS Source #

HasTypeProxy era => HasTypeProxy (Tx era) 
Instance details

Defined in Cardano.Api.Tx.Sign

Associated Types

data AsType (Tx era) #

Methods

proxyToAsType :: Proxy (Tx era) -> AsType (Tx era) #

IsShelleyBasedEra era => SerialiseAsCBOR (Tx era) 
Instance details

Defined in Cardano.Api.Tx.Sign

Methods

serialiseToCBOR :: Tx era -> ByteString #

deserialiseFromCBOR :: AsType (Tx era) -> ByteString -> Either DecoderError (Tx era) #

IsShelleyBasedEra era => HasTextEnvelope (Tx era) 
Instance details

Defined in Cardano.Api.Tx.Sign

Eq (InAnyShelleyBasedEra Tx) 
Instance details

Defined in Cardano.Api.Tx.Sign

Eq (InAnyCardanoEra Tx) 
Instance details

Defined in Cardano.Api.Tx.Sign

Eq (Tx era) 
Instance details

Defined in Cardano.Api.Tx.Sign

Methods

(==) :: Tx era -> Tx era -> Bool Source #

(/=) :: Tx era -> Tx era -> Bool Source #

data AsType (Tx era) 
Instance details

Defined in Cardano.Api.Tx.Sign

data AsType (Tx era) = AsTx (AsType era)