Safe Haskell | None |
---|---|
Language | Haskell2010 |
The chain index' version of a transaction
Synopsis
- data ChainIndexTx = ChainIndexTx {
- _citxTxId :: TxId
- _citxInputs :: [TxOutRef]
- _citxOutputs :: ChainIndexTxOutputs
- _citxValidRange :: !SlotRange
- _citxData :: Map DatumHash Datum
- _citxRedeemers :: Redeemers
- _citxScripts :: Map ScriptHash (Versioned Script)
- _citxCardanoTx :: Maybe CardanoTx
- data ChainIndexTxOutputs
- data ChainIndexTxOut = ChainIndexTxOut {
- citoAddress :: CardanoAddress
- citoValue :: Value
- citoDatum :: OutputDatum
- citoRefScript :: ReferenceScript
- data ReferenceScript
- = ReferenceScriptNone
- | ReferenceScriptInAnyLang ScriptInAnyLang
- data Address = Address {
- addressCredential :: Credential
- addressStakingCredential :: Maybe StakingCredential
- data OutputDatum
- = NoOutputDatum
- | OutputDatumHash DatumHash
- | OutputDatum Datum
- newtype Value = Value {}
- fromOnChainTx :: OnChainTx -> ChainIndexTx
- txOuts :: ChainIndexTx -> [ChainIndexTxOut]
- txOutRefs :: ChainIndexTx -> [TxOutRef]
- txOutsWithRef :: ChainIndexTx -> [(ChainIndexTxOut, TxOutRef)]
- txOutRefMap :: ChainIndexTx -> Map TxOutRef (ChainIndexTxOut, ChainIndexTx)
- txOutRefMapForAddr :: CardanoAddress -> ChainIndexTx -> Map TxOutRef (ChainIndexTxOut, ChainIndexTx)
- txRedeemersWithHash :: ChainIndexTx -> Map RedeemerHash Redeemer
- validityFromChainIndex :: ChainIndexTx -> TxValidity
- citxTxId :: Lens' ChainIndexTx TxId
- citxInputs :: Lens' ChainIndexTx [TxOutRef]
- citxOutputs :: Lens' ChainIndexTx ChainIndexTxOutputs
- citxValidRange :: Lens' ChainIndexTx SlotRange
- citxData :: Lens' ChainIndexTx (Map DatumHash Datum)
- citxRedeemers :: Lens' ChainIndexTx Redeemers
- citxScripts :: Lens' ChainIndexTx (Map ScriptHash (Versioned Script))
- citxCardanoTx :: Lens' ChainIndexTx (Maybe CardanoTx)
- _InvalidTx :: Prism' ChainIndexTxOutputs (Maybe ChainIndexTxOut)
- _ValidTx :: Prism' ChainIndexTxOutputs [ChainIndexTxOut]
Documentation
data ChainIndexTx Source #
ChainIndexTx | |
|
Instances
data ChainIndexTxOutputs Source #
List of outputs of a transaction. There is only an optional collateral output if the transaction is invalid.
InvalidTx (Maybe ChainIndexTxOut) | The transaction is invalid so there is maybe a collateral output. |
ValidTx [ChainIndexTxOut] |
Instances
data ChainIndexTxOut Source #
ChainIndexTxOut | |
|
Instances
data ReferenceScript Source #
ReferenceScriptNone | |
ReferenceScriptInAnyLang ScriptInAnyLang |
Instances
Address | |
|
Instances
data OutputDatum #
NoOutputDatum | |
OutputDatumHash DatumHash | |
OutputDatum Datum |
Instances
Instances
Eq Value | |
Data Value | |
Defined in Plutus.V1.Ledger.Value 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 | |
Generic Value | |
Semigroup Value | |
Monoid Value | |
NFData Value | |
Defined in Plutus.V1.Ledger.Value | |
ToSchema Value | |
Defined in Plutus.ChainIndex.Types declareNamedSchema :: Proxy Value -> Declare (Definitions Schema) NamedSchema | |
Pretty Value | |
Defined in Plutus.V1.Ledger.Value prettyList :: [Value] -> Doc ann | |
AdditiveGroup Value | |
Defined in Plutus.V1.Ledger.Value | |
AdditiveMonoid Value | |
Defined in Plutus.V1.Ledger.Value | |
AdditiveSemigroup Value | |
Defined in Plutus.V1.Ledger.Value | |
Eq Value | |
Defined in Plutus.V1.Ledger.Value | |
FromData Value | |
Defined in Plutus.V1.Ledger.Value fromBuiltinData :: BuiltinData -> Maybe Value | |
ToData Value | |
Defined in Plutus.V1.Ledger.Value toBuiltinData :: Value -> BuiltinData | |
UnsafeFromData Value | |
Defined in Plutus.V1.Ledger.Value unsafeFromBuiltinData :: BuiltinData -> Value | |
Monoid Value | |
Defined in Plutus.V1.Ledger.Value | |
Semigroup Value | |
Defined in Plutus.V1.Ledger.Value | |
JoinSemiLattice Value | |
Defined in Plutus.V1.Ledger.Value | |
MeetSemiLattice Value | |
Defined in Plutus.V1.Ledger.Value | |
Group Value | |
Defined in Plutus.V1.Ledger.Value | |
Lift DefaultUni Value | |
Defined in Plutus.V1.Ledger.Value | |
Module Integer Value | |
Defined in Plutus.V1.Ledger.Value | |
Typeable DefaultUni Value | |
Defined in Plutus.V1.Ledger.Value | |
type Rep Value | |
Defined in Plutus.V1.Ledger.Value type Rep Value = D1 ('MetaData "Value" "Plutus.V1.Ledger.Value" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" '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.
txRedeemersWithHash :: ChainIndexTx -> Map RedeemerHash Redeemer Source #
Lenses
citxTxId :: Lens' ChainIndexTx TxId Source #
citxInputs :: Lens' ChainIndexTx [TxOutRef] Source #
citxOutputs :: Lens' ChainIndexTx ChainIndexTxOutputs Source #
citxValidRange :: Lens' ChainIndexTx SlotRange Source #
citxData :: Lens' ChainIndexTx (Map DatumHash Datum) Source #
citxRedeemers :: Lens' ChainIndexTx Redeemers Source #
citxScripts :: Lens' ChainIndexTx (Map ScriptHash (Versioned Script)) Source #
citxCardanoTx :: Lens' ChainIndexTx (Maybe CardanoTx) Source #
_InvalidTx :: Prism' ChainIndexTxOutputs (Maybe ChainIndexTxOut) Source #
_ValidTx :: Prism' ChainIndexTxOutputs [ChainIndexTxOut] Source #