Module

Ctl.Internal.QueryM.Ogmios.Types

Provides types and instances to create Ogmios requests and decode its responses.

#ChainOrigin

newtype ChainOrigin

The origin of the blockchain. It doesn't point to any existing slots, but

Constructors

Instances

#ChainPoint

type ChainPoint = { id :: OgmiosBlockHeaderHash, slot :: Slot }

A point on the chain, identified by a slot and a block header hash

#OgmiosBlockHeaderHash

#PParamRational

newtype PParamRational

A version of Rational with Aeson instance that decodes from x/y representation, instead of { numerator, denominator }

Constructors

Instances

#PoolParameters

type PoolParameters = { cost :: BigNum, margin :: UnitInterval, pledge :: BigNum, poolMetadata :: Maybe PoolMetadata, poolOwners :: Array Ed25519KeyHash, relays :: Array Relay, rewardAccount :: RewardAddress, vrfKeyhash :: VRFKeyHash }

#decodeResult

decodeResult :: forall o. (Aeson -> Either JsonDecodeError o) -> Aeson -> Either OgmiosDecodeError o

Decode "result" field of ogmios response.

#decodeErrorOrResult

decodeErrorOrResult :: forall o. { parseError :: Aeson -> Either JsonDecodeError o } -> { parseResult :: Aeson -> Either JsonDecodeError o } -> Aeson -> Either OgmiosDecodeError o

Decode "result" field or if absent the error field of ogmios response.

#OgmiosError

#pprintOgmiosDecodeError

#ogmiosDecodeErrorToError

#submitSuccessPartialResp

submitSuccessPartialResp :: TransactionHash -> { result :: { transaction :: { id :: TransactionHash } } }

#parseIpv6String

Modules