| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Mantra.Query
Contents
Description
Querying the blockchain and submitting transactions.
Synopsis
- queryProtocol :: IsShelleyBasedEra era => MonadFail m => MonadIO m => ShelleyBasedEra era -> FilePath -> ConsensusModeParams CardanoMode -> NetworkId -> MantraM m ProtocolParameters
- queryTip :: MonadFail m => MonadIO m => FilePath -> ConsensusModeParams CardanoMode -> NetworkId -> MantraM m SlotNo
- queryUTxO :: IsCardanoEra era => MonadFail m => MonadIO m => ShelleyBasedEra era -> FilePath -> ConsensusModeParams CardanoMode -> AddressAny -> NetworkId -> MantraM m (UTxO era)
- submitTransaction :: IsCardanoEra era => MonadIO m => ShelleyBasedEra era -> FilePath -> ConsensusModeParams CardanoMode -> NetworkId -> Tx era -> MantraM m (SubmitResult (TxValidationErrorInMode CardanoMode))
- adjustSlot :: SlotRef -> SlotNo -> SlotNo
Querying
Arguments
| :: IsShelleyBasedEra era | |
| => MonadFail m | |
| => MonadIO m | |
| => ShelleyBasedEra era | The era. |
| -> FilePath | Path to the node's socket. |
| -> ConsensusModeParams CardanoMode | The consensus mode. |
| -> NetworkId | The network. |
| -> MantraM m ProtocolParameters | Action to find the protocol parameters. |
Find the protocol parameters.
Arguments
| :: MonadFail m | |
| => MonadIO m | |
| => FilePath | Path to the node's socket. |
| -> ConsensusModeParams CardanoMode | The consensus mode. |
| -> NetworkId | The network. |
| -> MantraM m SlotNo | Action to find the slot number. |
Find the tip of the blockchain.
Arguments
| :: IsCardanoEra era | |
| => MonadFail m | |
| => MonadIO m | |
| => ShelleyBasedEra era | The era. |
| -> FilePath | Path to the node's socket. |
| -> ConsensusModeParams CardanoMode | The consensus mode. |
| -> AddressAny | The address. |
| -> NetworkId | The network. |
| -> MantraM m (UTxO era) | Action to find the UTxOs. |
Find UTxOs at an address.
Transactions
Arguments
| :: IsCardanoEra era | |
| => MonadIO m | |
| => ShelleyBasedEra era | The era. |
| -> FilePath | Path to the node's socket. |
| -> ConsensusModeParams CardanoMode | The consensus mode. |
| -> NetworkId | The network. |
| -> Tx era | The transaction. |
| -> MantraM m (SubmitResult (TxValidationErrorInMode CardanoMode)) | Action to submit the transaction and return its result. |
Submit a transaction.
Slots
Arguments
| :: SlotRef | The slot reference. |
| -> SlotNo | The current tip. |
| -> SlotNo | The resultant slot number. |
Compute a slot number.