Module

Cardano.Kupmios.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 }

#parseIpv6String

#submitSuccessPartialResp

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

Re-exports from Cardano.Provider.OgmiosTypes

#RedeemerPointer

type RedeemerPointer = { redeemerIndex :: UInt, redeemerTag :: RedeemerTag }

#OgmiosTxOutRef

type OgmiosTxOutRef = { index :: UInt, txId :: String }

#OgmiosTxOut

type OgmiosTxOut = { address :: OgmiosAddress, datum :: Maybe String, datumHash :: Maybe String, script :: Maybe ScriptRef, value :: Value }

#OgmiosTxIn

type OgmiosTxIn = { index :: Int, txId :: OgmiosTxId }

#OgmiosTxId

#OgmiosScript

#OgmiosRedeemerPtr

type OgmiosRedeemerPtr = { index :: UInt, purpose :: String }

#OgmiosError

#OgmiosDatum

#OgmiosAddress

#JsonRpc2Response

type JsonRpc2Response = { error :: Maybe Aeson, id :: Maybe String, jsonrpc :: String, method :: Maybe String, result :: Maybe Aeson }

Structure of all json rpc websocket responses

#ExecutionUnits

type ExecutionUnits = { memory :: BigNum, steps :: BigNum }

#DecodeOgmios

class DecodeOgmios o  where

Variation of DecodeAeson for ogmios response, defines how to parse full ogmios reponse.

Members

Instances

#showRedeemerPointer

#redeemerTypeMismatch

#redeemerTagFromString

#pprintOgmiosError

#pprintOgmiosDecodeError

#ogmiosDecodeErrorToError

#makeDecodeOgmios

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

Given how to parse result or error fields,

#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.

Modules