marlowe-runtime-0.0.5: Runtime system for running Marlowe financial contracts on the Cardano Computation Layer
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Marlowe.Runtime.History.Api

Documentation

data ContractHistoryError Source #

Instances

Instances details
ToJSON ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Generic ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Associated Types

type Rep ContractHistoryError :: Type -> Type Source #

Show ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Binary ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Eq ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Ord ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Variations ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep ContractHistoryError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep ContractHistoryError = D1 ('MetaData "ContractHistoryError" "Language.Marlowe.Runtime.History.Api" "marlowe-runtime-0.0.5-H8RTxAzG3C6GnrcPnjT21L-history-api" 'False) (((C1 ('MetaCons "HansdshakeFailed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FindTxFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxError))) :+: (C1 ('MetaCons "ExtractContractFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExtractCreationError)) :+: C1 ('MetaCons "FollowScriptUTxOFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTxOError)))) :+: ((C1 ('MetaCons "FollowPayoutUTxOsFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map TxOutRef UTxOError))) :+: C1 ('MetaCons "ExtractMarloweTransactionFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExtractMarloweTransactionError))) :+: (C1 ('MetaCons "PayoutUTxONotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef)) :+: C1 ('MetaCons "CreateTxRolledBack" 'PrefixI 'False) (U1 :: Type -> Type))))

data ExtractCreationError Source #

Instances

Instances details
ToJSON ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Generic ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Associated Types

type Rep ExtractCreationError :: Type -> Type Source #

Show ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Binary ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Eq ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Ord ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Variations ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep ExtractCreationError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep ExtractCreationError = D1 ('MetaData "ExtractCreationError" "Language.Marlowe.Runtime.History.Api" "marlowe-runtime-0.0.5-H8RTxAzG3C6GnrcPnjT21L-history-api" 'False) ((C1 ('MetaCons "TxIxNotFound" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ByronAddress" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonScriptAddress" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "InvalidScriptHash" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoCreateDatum" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "InvalidCreateDatum" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotCreationTransaction" 'PrefixI 'False) (U1 :: Type -> Type))))

data ExtractMarloweTransactionError Source #

Instances

Instances details
ToJSON ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Generic ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Associated Types

type Rep ExtractMarloweTransactionError :: Type -> Type Source #

Show ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Binary ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Eq ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Ord ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Variations ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep ExtractMarloweTransactionError Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep ExtractMarloweTransactionError = D1 ('MetaData "ExtractMarloweTransactionError" "Language.Marlowe.Runtime.History.Api" "marlowe-runtime-0.0.5-H8RTxAzG3C6GnrcPnjT21L-history-api" 'False) (((C1 ('MetaCons "TxInNotFound" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoRedeemer" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "InvalidRedeemer" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NoTransactionDatum" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidTransactionDatum" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "NoPayoutDatum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef)) :+: C1 ('MetaCons "InvalidPayoutDatum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef))) :+: (C1 ('MetaCons "InvalidValidityRange" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SlotConversionFailed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MultipleContractInputs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set TxOutRef)))))))

data CreateStep v Source #

Constructors

CreateStep 

Fields

Instances

Instances details
ToJSON (CreateStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

toJSON :: CreateStep 'V1 -> Value

toEncoding :: CreateStep 'V1 -> Encoding

toJSONList :: [CreateStep 'V1] -> Value

toEncodingList :: [CreateStep 'V1] -> Encoding

Generic (CreateStep v) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Associated Types

type Rep (CreateStep v) :: Type -> Type Source #

Methods

from :: CreateStep v -> Rep (CreateStep v) x Source #

to :: Rep (CreateStep v) x -> CreateStep v Source #

Show (CreateStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Binary (CreateStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

put :: CreateStep 'V1 -> Put

get :: Get (CreateStep 'V1)

putList :: [CreateStep 'V1] -> Put

Eq (CreateStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

(==) :: CreateStep 'V1 -> CreateStep 'V1 -> Bool Source #

(/=) :: CreateStep 'V1 -> CreateStep 'V1 -> Bool Source #

Variations (CreateStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep (CreateStep v) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep (CreateStep v) = D1 ('MetaData "CreateStep" "Language.Marlowe.Runtime.History.Api" "marlowe-runtime-0.0.5-H8RTxAzG3C6GnrcPnjT21L-history-api" 'False) (C1 ('MetaCons "CreateStep" 'PrefixI 'True) (S1 ('MetaSel ('Just "createOutput") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TransactionScriptOutput v)) :*: (S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MarloweTransactionMetadata) :*: S1 ('MetaSel ('Just "payoutValidatorHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptHash))))

data RedeemStep v Source #

Constructors

RedeemStep 

Fields

Instances

Instances details
ToJSON (RedeemStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

toJSON :: RedeemStep 'V1 -> Value

toEncoding :: RedeemStep 'V1 -> Encoding

toJSONList :: [RedeemStep 'V1] -> Value

toEncodingList :: [RedeemStep 'V1] -> Encoding

Generic (RedeemStep v) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Associated Types

type Rep (RedeemStep v) :: Type -> Type Source #

Methods

from :: RedeemStep v -> Rep (RedeemStep v) x Source #

to :: Rep (RedeemStep v) x -> RedeemStep v Source #

Show (RedeemStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Binary (RedeemStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

put :: RedeemStep 'V1 -> Put

get :: Get (RedeemStep 'V1)

putList :: [RedeemStep 'V1] -> Put

Eq (RedeemStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

(==) :: RedeemStep 'V1 -> RedeemStep 'V1 -> Bool Source #

(/=) :: RedeemStep 'V1 -> RedeemStep 'V1 -> Bool Source #

Variations (RedeemStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep (RedeemStep v) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep (RedeemStep v) = D1 ('MetaData "RedeemStep" "Language.Marlowe.Runtime.History.Api" "marlowe-runtime-0.0.5-H8RTxAzG3C6GnrcPnjT21L-history-api" 'False) (C1 ('MetaCons "RedeemStep" 'PrefixI 'True) (S1 ('MetaSel ('Just "utxo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef) :*: (S1 ('MetaSel ('Just "redeemingTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Just "datum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayoutDatum v)))))

data ContractStep v Source #

Constructors

ApplyTransaction (Transaction v) 
RedeemPayout (RedeemStep v) 

Instances

Instances details
ToJSON (ContractStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

toJSON :: ContractStep 'V1 -> Value

toEncoding :: ContractStep 'V1 -> Encoding

toJSONList :: [ContractStep 'V1] -> Value

toEncodingList :: [ContractStep 'V1] -> Encoding

Generic (ContractStep v) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Associated Types

type Rep (ContractStep v) :: Type -> Type Source #

Show (ContractStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Binary (ContractStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Methods

put :: ContractStep 'V1 -> Put

get :: Get (ContractStep 'V1)

putList :: [ContractStep 'V1] -> Put

Eq (ContractStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

Variations (ContractStep 'V1) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep (ContractStep v) Source # 
Instance details

Defined in Language.Marlowe.Runtime.History.Api

type Rep (ContractStep v) = D1 ('MetaData "ContractStep" "Language.Marlowe.Runtime.History.Api" "marlowe-runtime-0.0.5-H8RTxAzG3C6GnrcPnjT21L-history-api" 'False) (C1 ('MetaCons "ApplyTransaction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Transaction v))) :+: C1 ('MetaCons "RedeemPayout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RedeemStep v))))

isScriptAddress :: ScriptHash -> Address -> Bool Source #

getOutput :: TxIx -> Transaction -> Either ExtractCreationError TransactionOutput Source #

extractMarloweTransaction :: MarloweVersion v -> SystemStart -> EraHistory CardanoMode -> ContractId -> Address -> ScriptHash -> TxOutRef -> BlockHeader -> Transaction -> Either ExtractMarloweTransactionError (Transaction v) Source #

isToScriptHash :: ScriptHash -> TransactionOutput -> Bool Source #

isToAddress :: Address -> TransactionOutput -> Bool Source #

consumesUTxO :: TxOutRef -> TransactionInput -> Bool Source #