Safe Haskell | None |
---|---|
Language | Haskell2010 |
Interface to the transaction types from 'cardano-api'
Synopsis
- module Ledger.Tx.CardanoAPI.Internal
- newtype CardanoBuildTx = CardanoBuildTx {
- getCardanoBuildTx :: TxBodyContent BuildTx BabbageEra
- data CardanoTx where
- fromCardanoTxInsCollateral :: TxInsCollateral era -> [TxIn]
- fromCardanoTotalCollateral :: TxTotalCollateral BabbageEra -> Maybe Lovelace
- fromCardanoReturnCollateral :: TxReturnCollateral CtxTx BabbageEra -> Maybe TxOut
- toCardanoTotalCollateral :: Maybe Lovelace -> TxTotalCollateral BabbageEra
- toCardanoReturnCollateral :: Maybe TxOut -> TxReturnCollateral CtxTx BabbageEra
- toCardanoDatumWitness :: Maybe Datum -> ScriptDatum WitCtxTxIn
- toCardanoTxInReferenceWitnessHeader :: Versioned TxOutRef -> Either ToCardanoError WitnessHeader
- toCardanoTxInScriptWitnessHeader :: Versioned Script -> Either ToCardanoError WitnessHeader
- toCardanoMintWitness :: Redeemer -> Maybe (Versioned TxOutRef) -> Maybe (Versioned MintingPolicy) -> Either ToCardanoError (ScriptWitness WitCtxMint BabbageEra)
- data ToCardanoError
- = TxBodyError String
- | DeserialisationError
- | InvalidValidityRange
- | ValueNotPureAda
- | OutputHasZeroAda
- | StakingPointersNotSupported
- | SimpleScriptsNotSupportedToCardano
- | MissingInputValidator
- | MissingDatum
- | MissingMintingPolicy
- | ScriptPurposeNotSupported ScriptTag
- | MissingMintingPolicyRedeemer
- | MissingStakeValidator
- | UnsupportedPlutusVersion Language
- | Tag String ToCardanoError
- data FromCardanoError = SimpleScriptsNotSupported
- getRequiredSigners :: Tx BabbageEra -> [PaymentPubKeyHash]
- fromPlutusIndex :: UtxoIndex -> UTxO (BabbageEra StandardCrypto)
- fromPlutusTxOut :: TxOut -> TxOut (BabbageEra StandardCrypto)
- fromPlutusTxOutRef :: TxOutRef -> Either ToCardanoError (TxIn StandardCrypto)
Documentation
newtype CardanoBuildTx Source #
CardanoBuildTx | |
|
Instances
Cardano tx from any era.
Instances
Eq CardanoTx Source # | |
Show CardanoTx Source # | |
Serialise CardanoTx Source # | |
Defined in Ledger.Tx.CardanoAPI.Internal encode :: CardanoTx -> Encoding encodeList :: [CardanoTx] -> Encoding decodeList :: Decoder s [CardanoTx] | |
FromJSON CardanoTx Source # | Converting If the "tx" field is from an unknown era, the JSON parser will print an error at runtime while parsing. |
Defined in Ledger.Tx.CardanoAPI.Internal parseJSON :: Value -> Parser CardanoTx parseJSONList :: Value -> Parser [CardanoTx] | |
ToJSON CardanoTx Source # | |
Defined in Ledger.Tx.CardanoAPI.Internal toEncoding :: CardanoTx -> Encoding toJSONList :: [CardanoTx] -> Value toEncodingList :: [CardanoTx] -> Encoding | |
Pretty CardanoTx Source # | |
fromCardanoTxInsCollateral :: TxInsCollateral era -> [TxIn] Source #
fromCardanoTotalCollateral :: TxTotalCollateral BabbageEra -> Maybe Lovelace Source #
fromCardanoReturnCollateral :: TxReturnCollateral CtxTx BabbageEra -> Maybe TxOut Source #
toCardanoTotalCollateral :: Maybe Lovelace -> TxTotalCollateral BabbageEra Source #
toCardanoReturnCollateral :: Maybe TxOut -> TxReturnCollateral CtxTx BabbageEra Source #
toCardanoDatumWitness :: Maybe Datum -> ScriptDatum WitCtxTxIn Source #
toCardanoTxInReferenceWitnessHeader :: Versioned TxOutRef -> Either ToCardanoError WitnessHeader Source #
toCardanoTxInScriptWitnessHeader :: Versioned Script -> Either ToCardanoError WitnessHeader Source #
toCardanoMintWitness :: Redeemer -> Maybe (Versioned TxOutRef) -> Maybe (Versioned MintingPolicy) -> Either ToCardanoError (ScriptWitness WitCtxMint BabbageEra) Source #
data ToCardanoError Source #
Instances
data FromCardanoError Source #
Instances
getRequiredSigners :: Tx BabbageEra -> [PaymentPubKeyHash] Source #
Conversion from Plutus types
fromPlutusIndex :: UtxoIndex -> UTxO (BabbageEra StandardCrypto) Source #
fromPlutusTxOut :: TxOut -> TxOut (BabbageEra StandardCrypto) Source #
fromPlutusTxOutRef :: TxOutRef -> Either ToCardanoError (TxIn StandardCrypto) Source #