plutus-ledger-1.2.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Tx

Synopsis

Documentation

data TxOutRef #

Constructors

TxOutRef 

Fields

Instances

Instances details
Eq TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxOutRef :: Type -> Type Source #

NFData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxOutRef -> () Source #

Serialise TxOutRef 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

encode :: TxOutRef -> Encoding

decode :: Decoder s TxOutRef

encodeList :: [TxOutRef] -> Encoding

decodeList :: Decoder s [TxOutRef]

FromJSON TxOutRef 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

parseJSON :: Value -> Parser TxOutRef

parseJSONList :: Value -> Parser [TxOutRef]

FromJSONKey TxOutRef 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

fromJSONKey :: FromJSONKeyFunction TxOutRef

fromJSONKeyList :: FromJSONKeyFunction [TxOutRef]

ToJSON TxOutRef 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

toJSON :: TxOutRef -> Value

toEncoding :: TxOutRef -> Encoding

toJSONList :: [TxOutRef] -> Value

toEncodingList :: [TxOutRef] -> Encoding

ToJSONKey TxOutRef 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

toJSONKey :: ToJSONKeyFunction TxOutRef

toJSONKeyList :: ToJSONKeyFunction [TxOutRef]

Eq TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

(==) :: TxOutRef -> TxOutRef -> Bool

Pretty TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

pretty :: TxOutRef -> Doc ann #

prettyList :: [TxOutRef] -> Doc ann #

FromData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

fromBuiltinData :: BuiltinData -> Maybe TxOutRef

ToData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

toBuiltinData :: TxOutRef -> BuiltinData

UnsafeFromData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

unsafeFromBuiltinData :: BuiltinData -> TxOutRef

Lift DefaultUni TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

lift :: TxOutRef -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

typeRep :: Proxy TxOutRef -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef = D1 ('MetaData "TxOutRef" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) (C1 ('MetaCons "TxOutRef" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutRefId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Just "txOutRefIdx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

isPayToScriptOut :: TxOut -> Bool #

isPubKeyOut :: TxOut -> Bool #

pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut #

pubKeyTxIns :: Fold (Set TxIn) TxIn #

scriptTxIns :: Fold (Set TxIn) TxIn #

data RedeemerPtr #

Instances

Instances details
Eq RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep RedeemerPtr :: Type -> Type Source #

NFData RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: RedeemerPtr -> () Source #

Serialise RedeemerPtr 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

encode :: RedeemerPtr -> Encoding

decode :: Decoder s RedeemerPtr

encodeList :: [RedeemerPtr] -> Encoding

decodeList :: Decoder s [RedeemerPtr]

FromJSON RedeemerPtr 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

parseJSON :: Value -> Parser RedeemerPtr

parseJSONList :: Value -> Parser [RedeemerPtr]

FromJSONKey RedeemerPtr 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

fromJSONKey :: FromJSONKeyFunction RedeemerPtr

fromJSONKeyList :: FromJSONKeyFunction [RedeemerPtr]

ToJSON RedeemerPtr 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

toJSON :: RedeemerPtr -> Value

toEncoding :: RedeemerPtr -> Encoding

toJSONList :: [RedeemerPtr] -> Value

toEncodingList :: [RedeemerPtr] -> Encoding

ToJSONKey RedeemerPtr 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

toJSONKey :: ToJSONKeyFunction RedeemerPtr

toJSONKeyList :: ToJSONKeyFunction [RedeemerPtr]

type Rep RedeemerPtr 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep RedeemerPtr = D1 ('MetaData "RedeemerPtr" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) (C1 ('MetaCons "RedeemerPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptTag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

data ScriptTag #

Constructors

Spend 
Mint 
Cert 
Reward 

Instances

Instances details
Eq ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep ScriptTag :: Type -> Type Source #

NFData ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: ScriptTag -> () Source #

Serialise ScriptTag 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

encode :: ScriptTag -> Encoding

decode :: Decoder s ScriptTag

encodeList :: [ScriptTag] -> Encoding

decodeList :: Decoder s [ScriptTag]

FromJSON ScriptTag 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

parseJSON :: Value -> Parser ScriptTag

parseJSONList :: Value -> Parser [ScriptTag]

ToJSON ScriptTag 
Instance details

Defined in Ledger.Tx.Orphans.V1

Methods

toJSON :: ScriptTag -> Value

toEncoding :: ScriptTag -> Encoding

toJSONList :: [ScriptTag] -> Value

toEncodingList :: [ScriptTag] -> Encoding

type Rep ScriptTag 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep ScriptTag = D1 ('MetaData "ScriptTag" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) ((C1 ('MetaCons "Spend" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mint" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cert" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Reward" 'PrefixI 'False) (U1 :: Type -> Type)))

data Language #

Constructors

PlutusV1 
PlutusV2 

Instances

Instances details
Bounded Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Enum Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Eq Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Ord Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Show Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Ix Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Generic Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Associated Types

type Rep Language :: Type -> Type Source #

NFData Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Methods

rnf :: Language -> () Source #

NoThunks Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Methods

noThunks :: Context -> Language -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> Language -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy Language -> String

FromCBOR Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Methods

fromCBOR :: Decoder s Language

label :: Proxy Language -> Text

ToCBOR Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

Methods

toCBOR :: Language -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Language -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Language] -> Size

type Rep Language 
Instance details

Defined in Cardano.Ledger.Alonzo.Language

type Rep Language = D1 ('MetaData "Language" "Cardano.Ledger.Alonzo.Language" "cardano-ledger-alonzo-0.1.0.0-9kQ50A9XcYDHq5wCBkTOc6" 'False) (C1 ('MetaCons "PlutusV1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PlutusV2" 'PrefixI 'False) (U1 :: Type -> Type))

data Versioned script #

Constructors

Versioned 

Fields

Instances

Instances details
Functor Versioned 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

fmap :: (a -> b) -> Versioned a -> Versioned b Source #

(<$) :: a -> Versioned b -> Versioned a Source #

Eq script => Eq (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

(==) :: Versioned script -> Versioned script -> Bool Source #

(/=) :: Versioned script -> Versioned script -> Bool Source #

Ord script => Ord (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

compare :: Versioned script -> Versioned script -> Ordering Source #

(<) :: Versioned script -> Versioned script -> Bool Source #

(<=) :: Versioned script -> Versioned script -> Bool Source #

(>) :: Versioned script -> Versioned script -> Bool Source #

(>=) :: Versioned script -> Versioned script -> Bool Source #

max :: Versioned script -> Versioned script -> Versioned script Source #

min :: Versioned script -> Versioned script -> Versioned script Source #

Show script => Show (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

showsPrec :: Int -> Versioned script -> ShowS Source #

show :: Versioned script -> String Source #

showList :: [Versioned script] -> ShowS Source #

Generic (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Associated Types

type Rep (Versioned script) :: Type -> Type Source #

Methods

from :: Versioned script -> Rep (Versioned script) x Source #

to :: Rep (Versioned script) x -> Versioned script Source #

Serialise script => Serialise (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

encode :: Versioned script -> Encoding

decode :: Decoder s (Versioned script)

encodeList :: [Versioned script] -> Encoding

decodeList :: Decoder s [Versioned script]

FromJSON script => FromJSON (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

parseJSON :: Value -> Parser (Versioned script)

parseJSONList :: Value -> Parser [Versioned script]

ToJSON script => ToJSON (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

toJSON :: Versioned script -> Value

toEncoding :: Versioned script -> Encoding

toJSONList :: [Versioned script] -> Value

toEncodingList :: [Versioned script] -> Encoding

Pretty script => Pretty (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

Methods

pretty :: Versioned script -> Doc ann #

prettyList :: [Versioned script] -> Doc ann #

type Rep (Versioned script) 
Instance details

Defined in Plutus.Script.Utils.Scripts

type Rep (Versioned script) = D1 ('MetaData "Versioned" "Plutus.Script.Utils.Scripts" "plutus-script-utils-1.2.0.0-5TpLCy32WGLK5IaOxcwe9j" 'False) (C1 ('MetaCons "Versioned" 'PrefixI 'True) (S1 ('MetaSel ('Just "unversioned") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 script) :*: S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Language)))

type ReferenceScript = ReferenceScript BabbageEra Source #

newtype TxOut Source #

Constructors

TxOut 

Fields

Instances

Instances details
Eq TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

(==) :: TxOut -> TxOut -> Bool Source #

(/=) :: TxOut -> TxOut -> Bool Source #

Show TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Generic TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Associated Types

type Rep TxOut :: Type -> Type Source #

Methods

from :: TxOut -> Rep TxOut x Source #

to :: Rep TxOut x -> TxOut Source #

Serialise TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

encode :: TxOut -> Encoding

decode :: Decoder s TxOut

encodeList :: [TxOut] -> Encoding

decodeList :: Decoder s [TxOut]

FromJSON TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

parseJSON :: Value -> Parser TxOut

parseJSONList :: Value -> Parser [TxOut]

ToJSON TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

toJSON :: TxOut -> Value

toEncoding :: TxOut -> Encoding

toJSONList :: [TxOut] -> Value

toEncodingList :: [TxOut] -> Encoding

Pretty TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

pretty :: TxOut -> Doc ann #

prettyList :: [TxOut] -> Doc ann #

FromCBOR TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

fromCBOR :: Decoder s TxOut

label :: Proxy TxOut -> Text

ToCBOR TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

toCBOR :: TxOut -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy TxOut -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [TxOut] -> Size

type Rep TxOut Source # 
Instance details

Defined in Ledger.Tx.Internal

type Rep TxOut = D1 ('MetaData "TxOut" "Ledger.Tx.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'True) (C1 ('MetaCons "TxOut" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTxOut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxOut CtxTx BabbageEra))))

data Certificate Source #

Constructors

Certificate 

Fields

Instances

Instances details
Eq Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

Show Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

Generic Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

Associated Types

type Rep Certificate :: Type -> Type Source #

Serialise Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

encode :: Certificate -> Encoding

decode :: Decoder s Certificate

encodeList :: [Certificate] -> Encoding

decodeList :: Decoder s [Certificate]

FromJSON Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

parseJSON :: Value -> Parser Certificate

parseJSONList :: Value -> Parser [Certificate]

ToJSON Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

toJSON :: Certificate -> Value

toEncoding :: Certificate -> Encoding

toJSONList :: [Certificate] -> Value

toEncodingList :: [Certificate] -> Encoding

Pretty Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

pretty :: Certificate -> Doc ann #

prettyList :: [Certificate] -> Doc ann #

type Rep Certificate Source # 
Instance details

Defined in Ledger.Tx.Internal

type Rep Certificate = D1 ('MetaData "Certificate" "Ledger.Tx.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (C1 ('MetaCons "Certificate" 'PrefixI 'True) (S1 ('MetaSel ('Just "certificateDcert") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCert) :*: S1 ('MetaSel ('Just "certificateRedeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Redeemer))))

data Withdrawal Source #

Stake withdrawal, if applicable the script should be included in txScripts.

Constructors

Withdrawal 

Fields

Instances

Instances details
Eq Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

Show Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

Generic Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

Associated Types

type Rep Withdrawal :: Type -> Type Source #

Serialise Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

encode :: Withdrawal -> Encoding

decode :: Decoder s Withdrawal

encodeList :: [Withdrawal] -> Encoding

decodeList :: Decoder s [Withdrawal]

FromJSON Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

parseJSON :: Value -> Parser Withdrawal

parseJSONList :: Value -> Parser [Withdrawal]

ToJSON Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

toJSON :: Withdrawal -> Value

toEncoding :: Withdrawal -> Encoding

toJSONList :: [Withdrawal] -> Value

toEncodingList :: [Withdrawal] -> Encoding

Pretty Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

Methods

pretty :: Withdrawal -> Doc ann #

prettyList :: [Withdrawal] -> Doc ann #

type Rep Withdrawal Source # 
Instance details

Defined in Ledger.Tx.Internal

type Rep Withdrawal = D1 ('MetaData "Withdrawal" "Ledger.Tx.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (C1 ('MetaCons "Withdrawal" 'PrefixI 'True) (S1 ('MetaSel ('Just "withdrawalCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Credential) :*: (S1 ('MetaSel ('Just "withdrawalAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "withdrawalRedeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Redeemer)))))

cardanoTxOutValue :: TxOut ctx era -> Value Source #

outValue :: Lens TxOut TxOut Value (TxOutValue BabbageEra) Source #

outValue' :: Lens' TxOut (TxOutValue BabbageEra) Source #

toSizedTxOut :: TxOut -> Sized (TxOut StandardBabbage) Source #

toCtxUTxOTxOut :: TxOut -> TxOut CtxUTxO BabbageEra Source #

txOutDatumHash :: TxOut -> Maybe DatumHash Source #

Get a hash from the stored TxOutDatum (either directly or by hashing the inlined datum)

txOutDatum :: forall d. FromData d => TxOut -> Maybe d Source #

cardanoTxOutDatumHash :: TxOutDatum CtxUTxO BabbageEra -> Maybe (Hash ScriptData) Source #

outAddress :: Lens' TxOut (AddressInEra BabbageEra) Source #

outDatumHash :: Lens TxOut TxOut (Maybe DatumHash) (TxOutDatum CtxTx BabbageEra) Source #

emptyTxBodyContent :: TxBodyContent BuildTx BabbageEra Source #

newtype TxId #

Constructors

TxId (Hash StandardCrypto EraIndependentTxBody) 

Instances

Instances details
Eq TxId 
Instance details

Defined in Cardano.Api.TxIn

Methods

(==) :: TxId -> TxId -> Bool Source #

(/=) :: TxId -> TxId -> Bool Source #

Ord TxId 
Instance details

Defined in Cardano.Api.TxIn

Show TxId 
Instance details

Defined in Cardano.Api.TxIn

IsString TxId 
Instance details

Defined in Cardano.Api.TxIn

Generic TxId Source # 
Instance details

Defined in Ledger.Tx.Orphans

Associated Types

type Rep TxId :: Type -> Type Source #

Methods

from :: TxId -> Rep TxId x Source #

to :: Rep TxId x -> TxId Source #

Serialise TxId 
Instance details

Defined in Ledger.Tx.Orphans

Methods

encode :: TxId -> Encoding

decode :: Decoder s TxId

encodeList :: [TxId] -> Encoding

decodeList :: Decoder s [TxId]

FromJSON TxId 
Instance details

Defined in Cardano.Api.TxIn

Methods

parseJSON :: Value -> Parser TxId

parseJSONList :: Value -> Parser [TxId]

FromJSONKey TxId 
Instance details

Defined in Cardano.Api.TxIn

Methods

fromJSONKey :: FromJSONKeyFunction TxId

fromJSONKeyList :: FromJSONKeyFunction [TxId]

ToJSON TxId 
Instance details

Defined in Cardano.Api.TxIn

Methods

toJSON :: TxId -> Value

toEncoding :: TxId -> Encoding

toJSONList :: [TxId] -> Value

toEncodingList :: [TxId] -> Encoding

ToJSONKey TxId 
Instance details

Defined in Cardano.Api.TxIn

Methods

toJSONKey :: ToJSONKeyFunction TxId

toJSONKeyList :: ToJSONKeyFunction [TxId]

Pretty TxId Source # 
Instance details

Defined in Ledger.Tx.Orphans

Methods

pretty :: TxId -> Doc ann #

prettyList :: [TxId] -> Doc ann #

HasTypeProxy TxId 
Instance details

Defined in Cardano.Api.TxIn

Associated Types

data AsType TxId

Methods

proxyToAsType :: Proxy TxId -> AsType TxId

SerialiseAsRawBytes TxId 
Instance details

Defined in Cardano.Api.TxIn

Methods

serialiseToRawBytes :: TxId -> ByteString

deserialiseFromRawBytes :: AsType TxId -> ByteString -> Maybe TxId

type Rep TxId Source # 
Instance details

Defined in Ledger.Tx.Orphans

type Rep TxId = D1 ('MetaData "TxId" "Cardano.Api.TxIn" "cardano-api-1.35.4-DlJBOMjUMEP4jWrRjidGIP" 'True) (C1 ('MetaCons "TxId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash StandardCrypto EraIndependentTxBody))))
data AsType TxId 
Instance details

Defined in Cardano.Api.TxIn

data AsType TxId = AsTxId

data TxIn #

Constructors

TxIn TxId TxIx 

Instances

Instances details
Eq TxIn 
Instance details

Defined in Cardano.Api.TxIn

Methods

(==) :: TxIn -> TxIn -> Bool Source #

(/=) :: TxIn -> TxIn -> Bool Source #

Ord TxIn 
Instance details

Defined in Cardano.Api.TxIn

Show TxIn 
Instance details

Defined in Cardano.Api.TxIn

Generic TxIn Source # 
Instance details

Defined in Ledger.Tx.Orphans

Associated Types

type Rep TxIn :: Type -> Type Source #

Methods

from :: TxIn -> Rep TxIn x Source #

to :: Rep TxIn x -> TxIn Source #

Serialise TxIn 
Instance details

Defined in Ledger.Tx.Orphans

Methods

encode :: TxIn -> Encoding

decode :: Decoder s TxIn

encodeList :: [TxIn] -> Encoding

decodeList :: Decoder s [TxIn]

FromJSON TxIn 
Instance details

Defined in Cardano.Api.TxIn

Methods

parseJSON :: Value -> Parser TxIn

parseJSONList :: Value -> Parser [TxIn]

FromJSONKey TxIn 
Instance details

Defined in Cardano.Api.TxIn

Methods

fromJSONKey :: FromJSONKeyFunction TxIn

fromJSONKeyList :: FromJSONKeyFunction [TxIn]

ToJSON TxIn 
Instance details

Defined in Cardano.Api.TxIn

Methods

toJSON :: TxIn -> Value

toEncoding :: TxIn -> Encoding

toJSONList :: [TxIn] -> Value

toEncodingList :: [TxIn] -> Encoding

ToJSONKey TxIn 
Instance details

Defined in Cardano.Api.TxIn

Methods

toJSONKey :: ToJSONKeyFunction TxIn

toJSONKeyList :: ToJSONKeyFunction [TxIn]

Pretty TxIn Source # 
Instance details

Defined in Ledger.Tx.Orphans

Methods

pretty :: TxIn -> Doc ann #

prettyList :: [TxIn] -> Doc ann #

type Rep TxIn Source # 
Instance details

Defined in Ledger.Tx.Orphans

type Rep TxIn = D1 ('MetaData "TxIn" "Cardano.Api.TxIn" "cardano-api-1.35.4-DlJBOMjUMEP4jWrRjidGIP" 'False) (C1 ('MetaCons "TxIn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIx)))

newtype TxIx #

Constructors

TxIx Word 

Instances

Instances details
Enum TxIx 
Instance details

Defined in Cardano.Api.TxIn

Eq TxIx 
Instance details

Defined in Cardano.Api.TxIn

Methods

(==) :: TxIx -> TxIx -> Bool Source #

(/=) :: TxIx -> TxIx -> Bool Source #

Ord TxIx 
Instance details

Defined in Cardano.Api.TxIn

Show TxIx 
Instance details

Defined in Cardano.Api.TxIn

Generic TxIx Source # 
Instance details

Defined in Ledger.Tx.Orphans

Associated Types

type Rep TxIx :: Type -> Type Source #

Methods

from :: TxIx -> Rep TxIx x Source #

to :: Rep TxIx x -> TxIx Source #

Serialise TxIx 
Instance details

Defined in Ledger.Tx.Orphans

Methods

encode :: TxIx -> Encoding

decode :: Decoder s TxIx

encodeList :: [TxIx] -> Encoding

decodeList :: Decoder s [TxIx]

FromJSON TxIx 
Instance details

Defined in Cardano.Api.TxIn

Methods

parseJSON :: Value -> Parser TxIx

parseJSONList :: Value -> Parser [TxIx]

ToJSON TxIx 
Instance details

Defined in Cardano.Api.TxIn

Methods

toJSON :: TxIx -> Value

toEncoding :: TxIx -> Encoding

toJSONList :: [TxIx] -> Value

toEncodingList :: [TxIx] -> Encoding

type Rep TxIx Source # 
Instance details

Defined in Ledger.Tx.Orphans

type Rep TxIx = D1 ('MetaData "TxIx" "Cardano.Api.TxIn" "cardano-api-1.35.4-DlJBOMjUMEP4jWrRjidGIP" 'True) (C1 ('MetaCons "TxIx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))

DecoratedTxOut

data DecoratedTxOut Source #

Offchain view of a transaction output.

Constructors

PublicKeyDecoratedTxOut 

Fields

ScriptDecoratedTxOut 

Fields

Instances

Instances details
Eq DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

Show DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

Generic DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

Associated Types

type Rep DecoratedTxOut :: Type -> Type Source #

Serialise DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

Methods

encode :: DecoratedTxOut -> Encoding

decode :: Decoder s DecoratedTxOut

encodeList :: [DecoratedTxOut] -> Encoding

decodeList :: Decoder s [DecoratedTxOut]

FromJSON DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

Methods

parseJSON :: Value -> Parser DecoratedTxOut

parseJSONList :: Value -> Parser [DecoratedTxOut]

ToJSON DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

Methods

toJSON :: DecoratedTxOut -> Value

toEncoding :: DecoratedTxOut -> Encoding

toJSONList :: [DecoratedTxOut] -> Value

toEncodingList :: [DecoratedTxOut] -> Encoding

Pretty DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

Methods

pretty :: DecoratedTxOut -> Doc ann #

prettyList :: [DecoratedTxOut] -> Doc ann #

type Rep DecoratedTxOut Source # 
Instance details

Defined in Ledger.Tx

type Rep DecoratedTxOut = D1 ('MetaData "DecoratedTxOut" "Ledger.Tx" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (C1 ('MetaCons "PublicKeyDecoratedTxOut" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_decoratedTxOutPubKeyHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PubKeyHash) :*: S1 ('MetaSel ('Just "_decoratedTxOutStakingCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe StakingCredential))) :*: (S1 ('MetaSel ('Just "_decoratedTxOutValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: (S1 ('MetaSel ('Just "_decoratedTxOutPubKeyDatum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (DatumHash, DatumFromQuery))) :*: S1 ('MetaSel ('Just "_decoratedTxOutReferenceScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Versioned Script)))))) :+: C1 ('MetaCons "ScriptDecoratedTxOut" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_decoratedTxOutValidatorHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ValidatorHash) :*: (S1 ('MetaSel ('Just "_decoratedTxOutStakingCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe StakingCredential)) :*: S1 ('MetaSel ('Just "_decoratedTxOutValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value))) :*: (S1 ('MetaSel ('Just "_decoratedTxOutScriptDatum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DatumHash, DatumFromQuery)) :*: (S1 ('MetaSel ('Just "_decoratedTxOutReferenceScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Versioned Script))) :*: S1 ('MetaSel ('Just "_decoratedTxOutValidator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Versioned Validator)))))))

toTxInfoTxOut :: DecoratedTxOut -> TxOut Source #

Converts a transaction output from the chain index to the plutus-ledger-api transaction output.

Note that DecoratedTxOut supports features such inline datums and reference scripts which are not supported by V1 TxOut. Converting from DecoratedTxOut to TxOut and back is therefore lossy.

Lenses and Prisms

smart Constructors

DatumFromQuery

data DatumFromQuery Source #

A datum in a transaction output that comes from a chain index query.

Instances

Instances details
Eq DatumFromQuery Source # 
Instance details

Defined in Ledger.Tx

Show DatumFromQuery Source # 
Instance details

Defined in Ledger.Tx

Generic DatumFromQuery Source # 
Instance details

Defined in Ledger.Tx

Associated Types

type Rep DatumFromQuery :: Type -> Type Source #

Serialise DatumFromQuery Source # 
Instance details

Defined in Ledger.Tx

Methods

encode :: DatumFromQuery -> Encoding

decode :: Decoder s DatumFromQuery

encodeList :: [DatumFromQuery] -> Encoding

decodeList :: Decoder s [DatumFromQuery]

FromJSON DatumFromQuery Source # 
Instance details

Defined in Ledger.Tx

Methods

parseJSON :: Value -> Parser DatumFromQuery

parseJSONList :: Value -> Parser [DatumFromQuery]

ToJSON DatumFromQuery Source # 
Instance details

Defined in Ledger.Tx

Methods

toJSON :: DatumFromQuery -> Value

toEncoding :: DatumFromQuery -> Encoding

toJSONList :: [DatumFromQuery] -> Value

toEncodingList :: [DatumFromQuery] -> Encoding

type Rep DatumFromQuery Source # 
Instance details

Defined in Ledger.Tx

type Rep DatumFromQuery = D1 ('MetaData "DatumFromQuery" "Ledger.Tx" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (C1 ('MetaCons "DatumUnknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DatumInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Datum)) :+: C1 ('MetaCons "DatumInBody" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Datum))))

Transactions

data CardanoTx where Source #

Cardano tx from any era.

Constructors

CardanoTx :: IsCardanoEra era => Tx era -> EraInMode era CardanoMode -> CardanoTx 

Bundled Patterns

pattern CardanoEmulatorEraTx :: Tx BabbageEra -> CardanoTx 

Instances

Instances details
Eq CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Show CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Serialise CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

encode :: CardanoTx -> Encoding

decode :: Decoder s CardanoTx

encodeList :: [CardanoTx] -> Encoding

decodeList :: Decoder s [CardanoTx]

FromJSON CardanoTx Source #

Converting CardanoTx to JSON.

If the "tx" field is from an unknown era, the JSON parser will print an error at runtime while parsing.

Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

parseJSON :: Value -> Parser CardanoTx

parseJSONList :: Value -> Parser [CardanoTx]

ToJSON CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

toJSON :: CardanoTx -> Value

toEncoding :: CardanoTx -> Encoding

toJSONList :: [CardanoTx] -> Value

toEncodingList :: [CardanoTx] -> Encoding

Pretty CardanoTx Source # 
Instance details

Defined in Ledger.Tx

Methods

pretty :: CardanoTx -> Doc ann #

prettyList :: [CardanoTx] -> Doc ann #

data ToCardanoError Source #

Instances

Instances details
Eq ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Show ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Generic ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Associated Types

type Rep ToCardanoError :: Type -> Type Source #

FromJSON ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

parseJSON :: Value -> Parser ToCardanoError

parseJSONList :: Value -> Parser [ToCardanoError]

ToJSON ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

toJSON :: ToCardanoError -> Value

toEncoding :: ToCardanoError -> Encoding

toJSONList :: [ToCardanoError] -> Value

toEncodingList :: [ToCardanoError] -> Encoding

Pretty ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

pretty :: ToCardanoError -> Doc ann #

prettyList :: [ToCardanoError] -> Doc ann #

type Rep ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

type Rep ToCardanoError = D1 ('MetaData "ToCardanoError" "Ledger.Tx.CardanoAPI.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (((C1 ('MetaCons "TxBodyError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: (C1 ('MetaCons "DeserialisationError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidValidityRange" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ValueNotPureAda" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OutputHasZeroAda" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "StakingPointersNotSupported" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SimpleScriptsNotSupportedToCardano" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "MissingInputValidator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MissingDatum" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MissingMintingPolicy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScriptPurposeNotSupported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptTag)))) :+: ((C1 ('MetaCons "MissingMintingPolicyRedeemer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MissingStakeValidator" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnsupportedPlutusVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Language)) :+: C1 ('MetaCons "Tag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ToCardanoError))))))

TxBodyContent functions

getTxBodyContentInputs :: TxBodyContent ctx era -> [TxIn] Source #

getTxBodyContentCollateralInputs :: TxBodyContent ctx era -> [TxIn] Source #

getTxBodyContentReturnCollateral :: TxBodyContent ctx BabbageEra -> Maybe TxOut Source #

getTxBodyContentMint :: TxBodyContent ctx era -> Value Source #

txBodyContentIns :: Lens' (TxBodyContent BuildTx BabbageEra) [(TxIn, BuildTxWith BuildTx (Witness WitCtxTxIn BabbageEra))] Source #

txBodyContentCollateralIns :: Lens' (TxBodyContent BuildTx BabbageEra) [TxIn] Source #

txBodyContentOuts :: Lens' (TxBodyContent ctx BabbageEra) [TxOut] Source #

Utility

Orphan instances

Pretty CardanoTx Source # 
Instance details

Methods

pretty :: CardanoTx -> Doc ann #

prettyList :: [CardanoTx] -> Doc ann #

Pretty CardanoBuildTx Source # 
Instance details

Methods

pretty :: CardanoBuildTx -> Doc ann #

prettyList :: [CardanoBuildTx] -> Doc ann #