plutus-chain-index-core-1.1.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.ChainIndex.Tx

Contents

Description

The chain index' version of a transaction

Synopsis

Documentation

data ChainIndexTx Source #

Constructors

ChainIndexTx 

Fields

Instances

Instances details
Eq ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Show ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Generic ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Associated Types

type Rep ChainIndexTx :: Type -> Type Source #

ToJSON ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

FromJSON ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

ToSchema ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Pretty ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Serialise ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

HasDbType ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.DbSchema

Associated Types

type DbType ChainIndexTx Source #

HasDbType (TxId, ChainIndexTx) Source # 
Instance details

Defined in Plutus.ChainIndex.DbSchema

Associated Types

type DbType (TxId, ChainIndexTx) Source #

type Rep ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.Types

type DbType ChainIndexTx Source # 
Instance details

Defined in Plutus.ChainIndex.DbSchema

type DbType (TxId, ChainIndexTx) Source # 
Instance details

Defined in Plutus.ChainIndex.DbSchema

data ChainIndexTxOutputs Source #

List of outputs of a transaction. There is only an optional collateral output if the transaction is invalid.

Constructors

InvalidTx (Maybe ChainIndexTxOut)

The transaction is invalid so there is maybe a collateral output.

ValidTx [ChainIndexTxOut] 

Instances

Instances details
Eq ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Show ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Generic ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Associated Types

type Rep ChainIndexTxOutputs :: Type -> Type Source #

ToJSON ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

FromJSON ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

ToSchema ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Serialise ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

type Rep ChainIndexTxOutputs Source # 
Instance details

Defined in Plutus.ChainIndex.Types

type Rep ChainIndexTxOutputs = D1 ('MetaData "ChainIndexTxOutputs" "Plutus.ChainIndex.Types" "plutus-chain-index-core-1.1.0.0-K7whjMLv5AnJVt0avXcbFn" 'False) (C1 ('MetaCons "InvalidTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ChainIndexTxOut))) :+: C1 ('MetaCons "ValidTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ChainIndexTxOut])))

data ChainIndexTxOut Source #

Constructors

ChainIndexTxOut 

Fields

Instances

Instances details
Eq ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Show ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Generic ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Associated Types

type Rep ChainIndexTxOut :: Type -> Type Source #

ToJSON ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

FromJSON ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

ToSchema ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Pretty ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Serialise ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

HasDbType ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.DbSchema

Associated Types

type DbType ChainIndexTxOut Source #

type Rep ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.Types

type Rep ChainIndexTxOut = D1 ('MetaData "ChainIndexTxOut" "Plutus.ChainIndex.Types" "plutus-chain-index-core-1.1.0.0-K7whjMLv5AnJVt0avXcbFn" 'False) (C1 ('MetaCons "ChainIndexTxOut" 'PrefixI 'True) ((S1 ('MetaSel ('Just "citoAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CardanoAddress) :*: S1 ('MetaSel ('Just "citoValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Value)) :*: (S1 ('MetaSel ('Just "citoDatum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 OutputDatum) :*: S1 ('MetaSel ('Just "citoRefScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ReferenceScript))))
type DbType ChainIndexTxOut Source # 
Instance details

Defined in Plutus.ChainIndex.DbSchema

data ReferenceScript Source #

Instances

Instances details
Eq ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Show ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Generic ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Associated Types

type Rep ReferenceScript :: Type -> Type Source #

ToJSON ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

FromJSON ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

ToSchema ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

Serialise ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

type Rep ReferenceScript Source # 
Instance details

Defined in Plutus.ChainIndex.Types

type Rep ReferenceScript = D1 ('MetaData "ReferenceScript" "Plutus.ChainIndex.Types" "plutus-chain-index-core-1.1.0.0-K7whjMLv5AnJVt0avXcbFn" 'False) (C1 ('MetaCons "ReferenceScriptNone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ReferenceScriptInAnyLang" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ScriptInAnyLang)))

data Address Source #

Address with two kinds of credentials, normal and staking.

Instances

Instances details
Eq Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Ord Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Show Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Generic Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Associated Types

type Rep Address :: Type -> Type Source #

NFData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Methods

rnf :: Address -> () Source #

Pretty Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Methods

pretty :: Address -> Doc ann Source #

prettyList :: [Address] -> Doc ann Source #

UnsafeFromData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

FromData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

ToData Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Eq Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Methods

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

Lift DefaultUni Address 
Instance details

Defined in Plutus.V1.Ledger.Address

Typeable DefaultUni Address 
Instance details

Defined in Plutus.V1.Ledger.Address

type Rep Address 
Instance details

Defined in Plutus.V1.Ledger.Address

type Rep Address = D1 ('MetaData "Address" "Plutus.V1.Ledger.Address" "plutus-ledger-api-1.0.0.1-EUjexvcAhXiGIaLon6olWb" 'False) (C1 ('MetaCons "Address" 'PrefixI 'True) (S1 ('MetaSel ('Just "addressCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Credential) :*: S1 ('MetaSel ('Just "addressStakingCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe StakingCredential))))

data OutputDatum Source #

The datum attached to an output: either nothing; a datum hash; or the datum itself (an "inline datum").

Instances

Instances details
Eq OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

Show OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

Generic OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

Associated Types

type Rep OutputDatum :: Type -> Type Source #

NFData OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

Methods

rnf :: OutputDatum -> () Source #

Pretty OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

UnsafeFromData OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

FromData OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

ToData OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

Eq OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

Lift DefaultUni OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

Typeable DefaultUni OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

type Rep OutputDatum 
Instance details

Defined in Plutus.V2.Ledger.Tx

type Rep OutputDatum = D1 ('MetaData "OutputDatum" "Plutus.V2.Ledger.Tx" "plutus-ledger-api-1.0.0.1-EUjexvcAhXiGIaLon6olWb" 'False) (C1 ('MetaCons "NoOutputDatum" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OutputDatumHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DatumHash)) :+: C1 ('MetaCons "OutputDatum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Datum))))

newtype Value Source #

A cryptocurrency value. This is a map from CurrencySymbols to a quantity of that currency.

Operations on currencies are usually implemented pointwise. That is, we apply the operation to the quantities for each currency in turn. So when we add two Values the resulting Value has, for each currency, the sum of the quantities of that particular currency in the argument Value. The effect of this is that the currencies in the Value are "independent", and are operated on separately.

Whenever we need to get the quantity of a currency in a Value where there is no explicit quantity of that currency in the Value, then the quantity is taken to be zero.

See note [Currencies] for more details.

Instances

Instances details
Eq Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

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

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

Data Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Value -> c Value Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Value Source #

toConstr :: Value -> Constr Source #

dataTypeOf :: Value -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Value) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value) Source #

gmapT :: (forall b. Data b => b -> b) -> Value -> Value Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Value -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Value -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Value -> m Value Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value Source #

Show Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Generic Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Associated Types

type Rep Value :: Type -> Type Source #

Methods

from :: Value -> Rep Value x Source #

to :: Rep Value x -> Value Source #

Semigroup Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Monoid Value 
Instance details

Defined in Plutus.V1.Ledger.Value

NFData Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

rnf :: Value -> () Source #

Pretty Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

pretty :: Value -> Doc ann Source #

prettyList :: [Value] -> Doc ann Source #

UnsafeFromData Value 
Instance details

Defined in Plutus.V1.Ledger.Value

FromData Value 
Instance details

Defined in Plutus.V1.Ledger.Value

ToData Value 
Instance details

Defined in Plutus.V1.Ledger.Value

JoinSemiLattice Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

(\/) :: Value -> Value -> Value Source #

MeetSemiLattice Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

(/\) :: Value -> Value -> Value Source #

AdditiveSemigroup Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

(+) :: Value -> Value -> Value Source #

AdditiveMonoid Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

zero :: Value Source #

AdditiveGroup Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

(-) :: Value -> Value -> Value Source #

Monoid Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

mempty :: Value Source #

Group Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

inv :: Value -> Value Source #

Semigroup Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

(<>) :: Value -> Value -> Value Source #

Eq Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

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

Module Integer Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Methods

scale :: Integer -> Value -> Value Source #

Lift DefaultUni Value 
Instance details

Defined in Plutus.V1.Ledger.Value

Typeable DefaultUni Value 
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep Value 
Instance details

Defined in Plutus.V1.Ledger.Value

type Rep Value = D1 ('MetaData "Value" "Plutus.V1.Ledger.Value" "plutus-ledger-api-1.0.0.1-EUjexvcAhXiGIaLon6olWb" 'True) (C1 ('MetaCons "Value" 'PrefixI 'True) (S1 ('MetaSel ('Just "getValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CurrencySymbol (Map TokenName Integer)))))

fromOnChainTx :: OnChainTx -> ChainIndexTx Source #

Convert a OnChainTx to a ChainIndexTx. An invalid OnChainTx will not produce any ChainIndexTx outputs and the collateral inputs of the OnChainTx will be the inputs of the ChainIndexTx.

txOuts :: ChainIndexTx -> [ChainIndexTxOut] Source #

Get tx outputs from tx.

txOutRefs :: ChainIndexTx -> [TxOutRef] Source #

Get tx output references from tx.

txOutsWithRef :: ChainIndexTx -> [(ChainIndexTxOut, TxOutRef)] Source #

Get tx output references and tx outputs from tx.

txOutRefMap :: ChainIndexTx -> Map TxOutRef (ChainIndexTxOut, ChainIndexTx) Source #

Get Map of tx outputs references to tx.

txOutRefMapForAddr :: CardanoAddress -> ChainIndexTx -> Map TxOutRef (ChainIndexTxOut, ChainIndexTx) Source #

Get Map of tx outputs from tx for a specific address.

Lenses