plutus-ledger-1.2.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Index.Internal

Synopsis

Documentation

newtype OnChainTx Source #

A transaction on the blockchain. Invalid transactions are still put on the chain to be able to collect fees.

Constructors

OnChainTx 

Fields

Instances

Instances details
Eq OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Show OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Generic OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Associated Types

type Rep OnChainTx :: Type -> Type Source #

Serialise OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

encode :: OnChainTx -> Encoding

decode :: Decoder s OnChainTx

encodeList :: [OnChainTx] -> Encoding

decodeList :: Decoder s [OnChainTx]

type Rep OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

type Rep OnChainTx = D1 ('MetaData "OnChainTx" "Ledger.Index.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'True) (C1 ('MetaCons "OnChainTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOnChainTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Validated (Tx EmulatorEra)))))

eitherTx :: (CardanoTx -> r) -> (CardanoTx -> r) -> OnChainTx -> r Source #

type EmulatorEra = BabbageEra StandardCrypto Source #

type UtxoIndex = UTxO BabbageEra Source #

The UTxOs of a blockchain indexed by their references.

data ValidationError Source #

A reason why a transaction is invalid.

Constructors

TxOutRefNotFound TxIn

The transaction output consumed by a transaction input could not be found (either because it was already spent, or because there was no transaction with the given hash on the blockchain).

ScriptFailure ScriptError

For pay-to-script outputs: evaluation of the validator script failed.

CardanoLedgerValidationError Text

An error from Cardano.Ledger validation

MaxCollateralInputsExceeded

Balancing failed, it needed more than the maximum number of collateral inputs

Instances

Instances details
Eq ValidationError Source # 
Instance details

Defined in Ledger.Index.Internal

Show ValidationError Source # 
Instance details

Defined in Ledger.Index.Internal

Generic ValidationError Source # 
Instance details

Defined in Ledger.Index.Internal

Associated Types

type Rep ValidationError :: Type -> Type Source #

FromJSON ValidationError Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

parseJSON :: Value -> Parser ValidationError

parseJSONList :: Value -> Parser [ValidationError]

ToJSON ValidationError Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

toJSON :: ValidationError -> Value

toEncoding :: ValidationError -> Encoding

toJSONList :: [ValidationError] -> Value

toEncodingList :: [ValidationError] -> Encoding

Pretty ValidationError Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

pretty :: ValidationError -> Doc ann #

prettyList :: [ValidationError] -> Doc ann #

type Rep ValidationError Source # 
Instance details

Defined in Ledger.Index.Internal

type Rep ValidationError = D1 ('MetaData "ValidationError" "Ledger.Index.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) ((C1 ('MetaCons "TxOutRefNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIn)) :+: C1 ('MetaCons "ScriptFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptError))) :+: (C1 ('MetaCons "CardanoLedgerValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "MaxCollateralInputsExceeded" 'PrefixI 'False) (U1 :: Type -> Type)))

data ValidationPhase Source #

Constructors

Phase1 
Phase2 

Instances

Instances details
Eq ValidationPhase Source # 
Instance details

Defined in Ledger.Index.Internal

Show ValidationPhase Source # 
Instance details

Defined in Ledger.Index.Internal

Generic ValidationPhase Source # 
Instance details

Defined in Ledger.Index.Internal

Associated Types

type Rep ValidationPhase :: Type -> Type Source #

FromJSON ValidationPhase Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

parseJSON :: Value -> Parser ValidationPhase

parseJSONList :: Value -> Parser [ValidationPhase]

ToJSON ValidationPhase Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

toJSON :: ValidationPhase -> Value

toEncoding :: ValidationPhase -> Encoding

toJSONList :: [ValidationPhase] -> Value

toEncodingList :: [ValidationPhase] -> Encoding

Pretty ValidationPhase Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

pretty :: ValidationPhase -> Doc ann #

prettyList :: [ValidationPhase] -> Doc ann #

type Rep ValidationPhase Source # 
Instance details

Defined in Ledger.Index.Internal

type Rep ValidationPhase = D1 ('MetaData "ValidationPhase" "Ledger.Index.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (C1 ('MetaCons "Phase1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Phase2" 'PrefixI 'False) (U1 :: Type -> Type))

type RedeemerReport = Map RdmrPtr ([Text], ExUnits) Source #

data ValidationResult Source #

Constructors

FailPhase1 !CardanoTx !ValidationError

A transaction failed to validate in phase 1.

FailPhase2 !OnChainTx !ValidationError !Value

A transaction failed to validate in phase 2. The Value indicates the amount of collateral stored in the transaction.

Success !OnChainTx !RedeemerReport 

Instances

Instances details
Eq ValidationResult Source # 
Instance details

Defined in Ledger.Index.Internal

Show ValidationResult Source # 
Instance details

Defined in Ledger.Index.Internal

Generic ValidationResult Source # 
Instance details

Defined in Ledger.Index.Internal

Associated Types

type Rep ValidationResult :: Type -> Type Source #

FromJSON ValidationResult Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

parseJSON :: Value -> Parser ValidationResult

parseJSONList :: Value -> Parser [ValidationResult]

ToJSON ValidationResult Source # 
Instance details

Defined in Ledger.Index.Internal

Pretty ValidationResult Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

pretty :: ValidationResult -> Doc ann #

prettyList :: [ValidationResult] -> Doc ann #

type Rep ValidationResult Source # 
Instance details

Defined in Ledger.Index.Internal

data ValidationResultSimple Source #

Instances

Instances details
Generic ValidationResultSimple Source # 
Instance details

Defined in Ledger.Index.Internal

Associated Types

type Rep ValidationResultSimple :: Type -> Type Source #

FromJSON ValidationResultSimple Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

parseJSON :: Value -> Parser ValidationResultSimple

parseJSONList :: Value -> Parser [ValidationResultSimple]

ToJSON ValidationResultSimple Source # 
Instance details

Defined in Ledger.Index.Internal

type Rep ValidationResultSimple Source # 
Instance details

Defined in Ledger.Index.Internal

getEvaluationLogs :: ValidationResult -> [Text] Source #

Get logs from evaluating plutus scripts.

Orphan instances

Semigroup (UTxO era) Source # 
Instance details

Methods

(<>) :: UTxO era -> UTxO era -> UTxO era Source #

sconcat :: NonEmpty (UTxO era) -> UTxO era Source #

stimes :: Integral b => b -> UTxO era -> UTxO era Source #

Monoid (UTxO era) Source # 
Instance details

Methods

mempty :: UTxO era Source #

mappend :: UTxO era -> UTxO era -> UTxO era Source #

mconcat :: [UTxO era] -> UTxO era Source #