Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Extract a = TxOut CtxTx BabbageEra → ScriptHash → Maybe a
- data TxWithEvents a = TxWithEvents {}
- data NewOutputEvent a = NewOutputEvent {
- neTransaction ∷ !TxId
- neEvent ∷ !a
- neTxIx ∷ !TxIx
- neOutput ∷ !ScriptOut
- neDatum ∷ !(Maybe (Data ERA))
- neBlockNo ∷ !Integer
- neSlot ∷ !SlotNo
- neScriptHash ∷ !ScriptHash
- neDataHash ∷ !ScriptOutDataHash
- neSigners ∷ ![KeyHash 'Witness StandardCrypto]
- neTxMetadata ∷ !(Map Word64 Metadatum)
- data OutputSpentEvent a = OutputSpentEvent {
- oseTxIn ∷ !TxIn
- oseRedeemer ∷ !(Data StandardBabbage)
- oseDatum ∷ !(Data StandardBabbage)
- oseSpendingTx ∷ !TxId
- oseTxOutput ∷ !(NewOutputEvent a)
- data Event a
- = AnOutputSpentEvent !(OutputSpentEvent a)
- | ANewOutputEvent !(NewOutputEvent a)
- type ScriptOutDataHash = DataHash (EraCrypto ERA)
- type ScriptOut = BabbageTxOut (BabbageEra StandardCrypto)
- txIn ∷ NewOutputEvent a → TxIn
- splitEvent ∷ Event a → Either (OutputSpentEvent a) (NewOutputEvent a)
- newtype ResolvedInputs a = ResolvedInputs (Map TxIn (NewOutputEvent a))
- extract ∷ Extract a → ResolvedInputs a → BlockInMode CardanoMode → ([TxWithEvents a], ResolvedInputs a)
- convertScript ∷ Script ERA → Maybe (Script PlutusScriptV1)
- extractBabbageTxn' ∷ ResolvedInputs a → Extract a → BlockHeader → Tx BabbageEra → ([TxWithEvents a], ResolvedInputs a)
- extractBabbageTxn ∷ ∀ a m. MonadState (ResolvedInputs a) m ⇒ Extract a → BlockHeader → Tx BabbageEra → m (Maybe (TxWithEvents a))
Documentation
type Extract a = TxOut CtxTx BabbageEra → ScriptHash → Maybe a Source #
data TxWithEvents a Source #
A transaction annotated with events extracted from it.
Instances
data NewOutputEvent a Source #
NewOutputEvent | |
|
Instances
data OutputSpentEvent a Source #
OutputSpentEvent | |
|
Instances
Instances
type ScriptOut = BabbageTxOut (BabbageEra StandardCrypto) Source #
splitEvent ∷ Event a → Either (OutputSpentEvent a) (NewOutputEvent a) Source #
Extraction
newtype ResolvedInputs a Source #
ResolvedInputs (Map TxIn (NewOutputEvent a)) |
Instances
∷ Extract a | |
→ ResolvedInputs a | Resolved inputs |
→ BlockInMode CardanoMode | New block |
→ ([TxWithEvents a], ResolvedInputs a) | Defi events extracted from block |
extractBabbageTxn' ∷ ResolvedInputs a → Extract a → BlockHeader → Tx BabbageEra → ([TxWithEvents a], ResolvedInputs a) Source #
extractBabbageTxn ∷ ∀ a m. MonadState (ResolvedInputs a) m ⇒ Extract a → BlockHeader → Tx BabbageEra → m (Maybe (TxWithEvents a)) Source #