Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Helper functions for querying a local cardano-node
using the socket interface
Synopsis
- querySystemStart ∷ NetworkId → FilePath → IO SystemStart
- queryEraHistory ∷ NetworkId → FilePath → IO (EraHistory CardanoMode)
- queryTip ∷ NetworkId → FilePath → IO (SlotNo, SlotLength, Hash BlockHeader)
- queryTipBlock ∷ NetworkId → FilePath → IO (WithOrigin BlockNo)
- queryTipSlotNo ∷ NetworkId → FilePath → IO (SlotNo, SlotLength)
- queryUTxO ∷ NetworkId → FilePath → [Address ShelleyAddr] → IO (UTxO BabbageEra)
- queryUTxOWhole ∷ NetworkId → FilePath → IO (UTxO BabbageEra)
- waitForTxn ∷ NetworkId → FilePath → Tx BabbageEra → IO ()
- waitForTxIn ∷ NetworkId → FilePath → TxIn → IO ()
- waitForTxInSpend ∷ NetworkId → FilePath → TxIn → IO ()
- localNodeConnectInfo ∷ NetworkId → FilePath → LocalNodeConnectInfo CardanoMode
- loadConnectInfo ∷ (MonadError InitialLedgerStateError m, MonadIO m) ⇒ FilePath → FilePath → m (LocalNodeConnectInfo CardanoMode, Env)
Documentation
∷ NetworkId | network Id to use for node query |
→ FilePath | Node socket |
→ IO SystemStart |
Get the SystemStart
from the node
∷ NetworkId | network Id to use for node query |
→ FilePath | Node socket |
→ IO (EraHistory CardanoMode) |
Get the EraHistory
from the node
∷ NetworkId | network Id to use for node query |
→ FilePath | Node socket |
→ IO (SlotNo, SlotLength, Hash BlockHeader) |
Get the tip (slot no. and block hash) from the node
queryTipBlock ∷ NetworkId → FilePath → IO (WithOrigin BlockNo) Source #
∷ NetworkId | network Id to use for node query |
→ FilePath | Node socket |
→ IO (SlotNo, SlotLength) |
Get the slot no of the current tip from the node
queryUTxO ∷ NetworkId → FilePath → [Address ShelleyAddr] → IO (UTxO BabbageEra) Source #
Query UTxO for all given addresses at given point.
Throws at least QueryException
if query fails.
queryUTxOWhole ∷ NetworkId → FilePath → IO (UTxO BabbageEra) Source #
Query the entire UTxO set
Throws at least QueryException
if query fails.
waitForTxn ∷ NetworkId → FilePath → Tx BabbageEra → IO () Source #
waitForTxIn ∷ NetworkId → FilePath → TxIn → IO () Source #
Wait until the output appears on the chain
waitForTxInSpend ∷ NetworkId → FilePath → TxIn → IO () Source #
Wait until the TxIn
is not part of the utxo set anymore
∷ (MonadError InitialLedgerStateError m, MonadIO m) | |
⇒ FilePath | Node config file (JSON) |
→ FilePath | Node socket |
→ m (LocalNodeConnectInfo CardanoMode, Env) |
Load the node config file and create LocalNodeConnectInfo
and Env
values that can be used to talk to the node.