Safe Haskell | None |
---|---|
Language | Haskell2010 |
Freer effects for querying and updating the chain index state.
Synopsis
-
data
ChainIndexQueryEffect
r
where
- DatumFromHash :: DatumHash -> ChainIndexQueryEffect ( Maybe Datum )
- ValidatorFromHash :: ValidatorHash -> ChainIndexQueryEffect ( Maybe (Versioned Validator ))
- MintingPolicyFromHash :: MintingPolicyHash -> ChainIndexQueryEffect ( Maybe (Versioned MintingPolicy ))
- RedeemerFromHash :: RedeemerHash -> ChainIndexQueryEffect ( Maybe Redeemer )
- StakeValidatorFromHash :: StakeValidatorHash -> ChainIndexQueryEffect ( Maybe (Versioned StakeValidator ))
- UnspentTxOutFromRef :: TxOutRef -> ChainIndexQueryEffect ( Maybe DecoratedTxOut)
- TxOutFromRef :: TxOutRef -> ChainIndexQueryEffect ( Maybe DecoratedTxOut)
- TxFromTxId :: TxId -> ChainIndexQueryEffect ( Maybe ChainIndexTx )
- UtxoSetMembership :: TxOutRef -> ChainIndexQueryEffect IsUtxoResponse
- UtxoSetAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect UtxosResponse
- UnspentTxOutSetAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect ( QueryResponse [( TxOutRef , DecoratedTxOut)])
- DatumsAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect ( QueryResponse [ Datum ])
- UtxoSetWithCurrency :: PageQuery TxOutRef -> AssetClass -> ChainIndexQueryEffect UtxosResponse
- TxsFromTxIds :: [ TxId ] -> ChainIndexQueryEffect [ ChainIndexTx ]
- TxoSetAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect TxosResponse
- GetTip :: ChainIndexQueryEffect Tip
- datumFromHash :: forall effs. Member ChainIndexQueryEffect effs => DatumHash -> Eff effs ( Maybe Datum )
- validatorFromHash :: forall effs. Member ChainIndexQueryEffect effs => ValidatorHash -> Eff effs ( Maybe (Versioned Validator ))
- mintingPolicyFromHash :: forall effs. Member ChainIndexQueryEffect effs => MintingPolicyHash -> Eff effs ( Maybe (Versioned MintingPolicy ))
- stakeValidatorFromHash :: forall effs. Member ChainIndexQueryEffect effs => StakeValidatorHash -> Eff effs ( Maybe (Versioned StakeValidator ))
- redeemerFromHash :: forall effs. Member ChainIndexQueryEffect effs => RedeemerHash -> Eff effs ( Maybe Redeemer )
- txOutFromRef :: forall effs. Member ChainIndexQueryEffect effs => TxOutRef -> Eff effs ( Maybe DecoratedTxOut)
- unspentTxOutFromRef :: forall effs. Member ChainIndexQueryEffect effs => TxOutRef -> Eff effs ( Maybe DecoratedTxOut)
- txFromTxId :: forall effs. Member ChainIndexQueryEffect effs => TxId -> Eff effs ( Maybe ChainIndexTx )
- utxoSetMembership :: forall effs. Member ChainIndexQueryEffect effs => TxOutRef -> Eff effs IsUtxoResponse
- utxoSetAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs UtxosResponse
- unspentTxOutSetAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs ( QueryResponse [( TxOutRef , DecoratedTxOut)])
- datumsAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs ( QueryResponse [ Datum ])
- utxoSetWithCurrency :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> AssetClass -> Eff effs UtxosResponse
- txoSetAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs TxosResponse
- txsFromTxIds :: forall effs. Member ChainIndexQueryEffect effs => [ TxId ] -> Eff effs [ ChainIndexTx ]
- getTip :: forall effs. Member ChainIndexQueryEffect effs => Eff effs Tip
-
data
ChainIndexControlEffect
r
where
- AppendBlocks :: [ ChainSyncBlock ] -> ChainIndexControlEffect ()
- Rollback :: Point -> ChainIndexControlEffect ()
- ResumeSync :: Point -> ChainIndexControlEffect ()
- CollectGarbage :: ChainIndexControlEffect ()
- GetDiagnostics :: ChainIndexControlEffect Diagnostics
- appendBlocks :: forall effs. Member ChainIndexControlEffect effs => [ ChainSyncBlock ] -> Eff effs ()
- rollback :: forall effs. Member ChainIndexControlEffect effs => Point -> Eff effs ()
- resumeSync :: forall effs. Member ChainIndexControlEffect effs => Point -> Eff effs ()
- collectGarbage :: forall effs. Member ChainIndexControlEffect effs => Eff effs ()
- getDiagnostics :: forall effs. Member ChainIndexControlEffect effs => Eff effs Diagnostics
Query effect
data ChainIndexQueryEffect r where Source #
DatumFromHash :: DatumHash -> ChainIndexQueryEffect ( Maybe Datum ) |
Get the datum from a datum hash (if available) |
ValidatorFromHash :: ValidatorHash -> ChainIndexQueryEffect ( Maybe (Versioned Validator )) |
Get the validator from a validator hash (if available) |
MintingPolicyFromHash :: MintingPolicyHash -> ChainIndexQueryEffect ( Maybe (Versioned MintingPolicy )) |
Get the monetary policy from an MPS hash (if available) |
RedeemerFromHash :: RedeemerHash -> ChainIndexQueryEffect ( Maybe Redeemer ) |
Get the redeemer from a redeemer hash (if available) |
StakeValidatorFromHash :: StakeValidatorHash -> ChainIndexQueryEffect ( Maybe (Versioned StakeValidator )) |
Get the stake validator from a stake validator hash (if available) |
UnspentTxOutFromRef :: TxOutRef -> ChainIndexQueryEffect ( Maybe DecoratedTxOut) |
Get the TxOut from a TxOutRef (if available) |
TxOutFromRef :: TxOutRef -> ChainIndexQueryEffect ( Maybe DecoratedTxOut) |
Get the TxOut from a TxOutRef (if available) |
TxFromTxId :: TxId -> ChainIndexQueryEffect ( Maybe ChainIndexTx ) |
Get the transaction for a tx ID |
UtxoSetMembership :: TxOutRef -> ChainIndexQueryEffect IsUtxoResponse |
Whether a tx output is part of the UTXO set |
UtxoSetAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect UtxosResponse |
Unspent outputs located at addresses with the given credential. |
UnspentTxOutSetAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect ( QueryResponse [( TxOutRef , DecoratedTxOut)]) |
Get the unspent txouts located at an address This is to avoid multiple queries from chain-index when using utxosAt |
DatumsAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect ( QueryResponse [ Datum ]) |
get the datums located at addresses with the given credential. |
UtxoSetWithCurrency :: PageQuery TxOutRef -> AssetClass -> ChainIndexQueryEffect UtxosResponse |
Unspent outputs containing a specific currency (
Note that requesting unspent outputs containing Ada should not return anything, as this request will always return all unspent outputs. |
TxsFromTxIds :: [ TxId ] -> ChainIndexQueryEffect [ ChainIndexTx ] |
Get the transactions for a list of tx IDs. |
TxoSetAtAddress :: PageQuery TxOutRef -> Credential -> ChainIndexQueryEffect TxosResponse |
Outputs located at addresses with the given credential. |
GetTip :: ChainIndexQueryEffect Tip |
Get the tip of the chain index |
datumFromHash :: forall effs. Member ChainIndexQueryEffect effs => DatumHash -> Eff effs ( Maybe Datum ) Source #
validatorFromHash :: forall effs. Member ChainIndexQueryEffect effs => ValidatorHash -> Eff effs ( Maybe (Versioned Validator )) Source #
mintingPolicyFromHash :: forall effs. Member ChainIndexQueryEffect effs => MintingPolicyHash -> Eff effs ( Maybe (Versioned MintingPolicy )) Source #
stakeValidatorFromHash :: forall effs. Member ChainIndexQueryEffect effs => StakeValidatorHash -> Eff effs ( Maybe (Versioned StakeValidator )) Source #
redeemerFromHash :: forall effs. Member ChainIndexQueryEffect effs => RedeemerHash -> Eff effs ( Maybe Redeemer ) Source #
txOutFromRef :: forall effs. Member ChainIndexQueryEffect effs => TxOutRef -> Eff effs ( Maybe DecoratedTxOut) Source #
unspentTxOutFromRef :: forall effs. Member ChainIndexQueryEffect effs => TxOutRef -> Eff effs ( Maybe DecoratedTxOut) Source #
txFromTxId :: forall effs. Member ChainIndexQueryEffect effs => TxId -> Eff effs ( Maybe ChainIndexTx ) Source #
utxoSetMembership :: forall effs. Member ChainIndexQueryEffect effs => TxOutRef -> Eff effs IsUtxoResponse Source #
utxoSetAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs UtxosResponse Source #
unspentTxOutSetAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs ( QueryResponse [( TxOutRef , DecoratedTxOut)]) Source #
datumsAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs ( QueryResponse [ Datum ]) Source #
utxoSetWithCurrency :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> AssetClass -> Eff effs UtxosResponse Source #
txoSetAtAddress :: forall effs. Member ChainIndexQueryEffect effs => PageQuery TxOutRef -> Credential -> Eff effs TxosResponse Source #
txsFromTxIds :: forall effs. Member ChainIndexQueryEffect effs => [ TxId ] -> Eff effs [ ChainIndexTx ] Source #
Control effect
data ChainIndexControlEffect r where Source #
AppendBlocks :: [ ChainSyncBlock ] -> ChainIndexControlEffect () |
Add new blocks to the chain index. |
Rollback :: Point -> ChainIndexControlEffect () |
Roll back to a previous state (previous tip) |
ResumeSync :: Point -> ChainIndexControlEffect () |
Resume syncing from a certain point |
CollectGarbage :: ChainIndexControlEffect () |
Delete all data that is not covered by current UTxOs. |
GetDiagnostics :: ChainIndexControlEffect Diagnostics |
appendBlocks :: forall effs. Member ChainIndexControlEffect effs => [ ChainSyncBlock ] -> Eff effs () Source #
resumeSync :: forall effs. Member ChainIndexControlEffect effs => Point -> Eff effs () Source #
collectGarbage :: forall effs. Member ChainIndexControlEffect effs => Eff effs () Source #
getDiagnostics :: forall effs. Member ChainIndexControlEffect effs => Eff effs Diagnostics Source #