Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Api.Internal.Convenience.Query
Contents
Description
Convenience query functions
Synopsis
- data QueryConvenienceError
- newtype TxCurrentTreasuryValue = TxCurrentTreasuryValue {}
- determineEra :: LocalNodeConnectInfo -> ExceptT AcquiringFailure IO AnyCardanoEra
- executeQueryCardanoMode :: SocketPath -> NetworkId -> QueryInMode (Either EraMismatch result) -> ExceptT QueryConvenienceError IO result
- executeQueryAnyMode :: LocalNodeConnectInfo -> QueryInMode (Either EraMismatch result) -> ExceptT QueryConvenienceError IO result
- queryStateForBalancedTx :: CardanoEra era -> [TxIn] -> [Certificate era] -> LocalStateQueryExpr block point QueryInMode r IO (Either QueryConvenienceError (UTxO era, LedgerProtocolParameters era, EraHistory, SystemStart, Set PoolId, Map StakeCredential Coin, Map (Credential 'DRepRole) Coin, Maybe (Featured ConwayEraOnwards era TxCurrentTreasuryValue)))
- renderQueryConvenienceError :: QueryConvenienceError -> Text
Documentation
data QueryConvenienceError Source #
Constructors
AcqFailure AcquiringFailure | |
QueryEraMismatch EraMismatch | |
ByronEraNotSupported | |
QceUnsupportedNtcVersion !UnsupportedNtcVersionError | |
QceUnexpectedException !SomeException |
Instances
newtype TxCurrentTreasuryValue Source #
Constructors
TxCurrentTreasuryValue | |
Fields |
Instances
determineEra :: LocalNodeConnectInfo -> ExceptT AcquiringFailure IO AnyCardanoEra Source #
Query the node to determine which era it is in.
Simplest query related
executeQueryCardanoMode :: SocketPath -> NetworkId -> QueryInMode (Either EraMismatch result) -> ExceptT QueryConvenienceError IO result Source #
Execute a query against the local node. The local node must be in CardanoMode.
executeQueryAnyMode :: LocalNodeConnectInfo -> QueryInMode (Either EraMismatch result) -> ExceptT QueryConvenienceError IO result Source #
Execute a query against the local node in any mode.
queryStateForBalancedTx :: CardanoEra era -> [TxIn] -> [Certificate era] -> LocalStateQueryExpr block point QueryInMode r IO (Either QueryConvenienceError (UTxO era, LedgerProtocolParameters era, EraHistory, SystemStart, Set PoolId, Map StakeCredential Coin, Map (Credential 'DRepRole) Coin, Maybe (Featured ConwayEraOnwards era TxCurrentTreasuryValue))) Source #
A convenience function to query the relevant information, from the local node, for Cardano.Api.Internal.Convenience.Construction.constructBalancedTx