playground-common-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Playground.Types

Synopsis

Documentation

data KnownCurrency Source #

Instances

Instances details
Eq KnownCurrency Source # 
Instance details

Defined in Playground.Types

Show KnownCurrency Source # 
Instance details

Defined in Playground.Types

Generic KnownCurrency Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep KnownCurrency :: Type -> Type Source #

ToJSON KnownCurrency Source # 
Instance details

Defined in Playground.Types

FromJSON KnownCurrency Source # 
Instance details

Defined in Playground.Types

type Rep KnownCurrency Source # 
Instance details

Defined in Playground.Types

type Rep KnownCurrency = D1 ('MetaData "KnownCurrency" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "KnownCurrency" 'PrefixI 'True) (S1 ('MetaSel ('Just "hash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ValidatorHash) :*: (S1 ('MetaSel ('Just "friendlyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "knownTokens") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty TokenName)))))

data PayToWalletParams Source #

Constructors

PayToWalletParams 

Fields

Instances

Instances details
Eq PayToWalletParams Source # 
Instance details

Defined in Playground.Types

Show PayToWalletParams Source # 
Instance details

Defined in Playground.Types

Generic PayToWalletParams Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep PayToWalletParams :: Type -> Type Source #

ToJSON PayToWalletParams Source # 
Instance details

Defined in Playground.Types

FromJSON PayToWalletParams Source # 
Instance details

Defined in Playground.Types

ToArgument PayToWalletParams Source # 
Instance details

Defined in Playground.Types

ToSchema PayToWalletParams Source # 
Instance details

Defined in Playground.Types

type Rep PayToWalletParams Source # 
Instance details

Defined in Playground.Types

type Rep PayToWalletParams = D1 ('MetaData "PayToWalletParams" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "PayToWalletParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "payTo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WalletNumber) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)))

data SimulatorWallet Source #

Instances

Instances details
Eq SimulatorWallet Source # 
Instance details

Defined in Playground.Types

Show SimulatorWallet Source # 
Instance details

Defined in Playground.Types

Generic SimulatorWallet Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep SimulatorWallet :: Type -> Type Source #

ToJSON SimulatorWallet Source # 
Instance details

Defined in Playground.Types

FromJSON SimulatorWallet Source # 
Instance details

Defined in Playground.Types

type Rep SimulatorWallet Source # 
Instance details

Defined in Playground.Types

type Rep SimulatorWallet = D1 ('MetaData "SimulatorWallet" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "SimulatorWallet" 'PrefixI 'True) (S1 ('MetaSel ('Just "simulatorWalletWallet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WalletNumber) :*: S1 ('MetaSel ('Just "simulatorWalletBalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)))

data ContractCall a Source #

Describes the mockchain requests the frontend can make of the backend. These will be mostly calls to their contract's various endpoints, but we supply a few extra special calls for the sake of easier testing and simulation.

Constructors

CallEndpoint

Call one of the defined endpoints of your contract.

AddBlocks

Add the specified number of blocks to the mockchain before continuing.

Fields

AddBlocksUntil

Keep adding blocks until the mockchain reaches the specified slot, then continue. (Note that calling AddBlocksUntil 20 doesn't mean you'll continue at slot 20, just that the slot number will now be at least that high.

Fields

PayToWallet

Make a wallet-to-wallet transfer of the specified value.

Instances

Instances details
Functor ContractCall Source # 
Instance details

Defined in Playground.Types

Methods

fmap :: (a -> b) -> ContractCall a -> ContractCall b Source #

(<$) :: a -> ContractCall b -> ContractCall a Source #

Foldable ContractCall Source # 
Instance details

Defined in Playground.Types

Methods

fold :: Monoid m => ContractCall m -> m Source #

foldMap :: Monoid m => (a -> m) -> ContractCall a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ContractCall a -> m Source #

foldr :: (a -> b -> b) -> b -> ContractCall a -> b Source #

foldr' :: (a -> b -> b) -> b -> ContractCall a -> b Source #

foldl :: (b -> a -> b) -> b -> ContractCall a -> b Source #

foldl' :: (b -> a -> b) -> b -> ContractCall a -> b Source #

foldr1 :: (a -> a -> a) -> ContractCall a -> a Source #

foldl1 :: (a -> a -> a) -> ContractCall a -> a Source #

toList :: ContractCall a -> [a] Source #

null :: ContractCall a -> Bool Source #

length :: ContractCall a -> Int Source #

elem :: Eq a => a -> ContractCall a -> Bool Source #

maximum :: Ord a => ContractCall a -> a Source #

minimum :: Ord a => ContractCall a -> a Source #

sum :: Num a => ContractCall a -> a Source #

product :: Num a => ContractCall a -> a Source #

Traversable ContractCall Source # 
Instance details

Defined in Playground.Types

Methods

traverse :: Applicative f => (a -> f b) -> ContractCall a -> f (ContractCall b) Source #

sequenceA :: Applicative f => ContractCall (f a) -> f (ContractCall a) Source #

mapM :: Monad m => (a -> m b) -> ContractCall a -> m (ContractCall b) Source #

sequence :: Monad m => ContractCall (m a) -> m (ContractCall a) Source #

Eq a => Eq (ContractCall a) Source # 
Instance details

Defined in Playground.Types

Show a => Show (ContractCall a) Source # 
Instance details

Defined in Playground.Types

Generic (ContractCall a) Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep (ContractCall a) :: Type -> Type Source #

ToJSON a => ToJSON (ContractCall a) Source # 
Instance details

Defined in Playground.Types

FromJSON a => FromJSON (ContractCall a) Source # 
Instance details

Defined in Playground.Types

type Rep (ContractCall a) Source # 
Instance details

Defined in Playground.Types

data Simulation Source #

The example simulations have meaningful (hard-coded) names, but, for any simulation the user creates in the playground, simulationName = "Simulation " <> show simulationId; the simulationId is simply present to ensure every simulation is created with a unique name.

Instances

Instances details
Eq Simulation Source # 
Instance details

Defined in Playground.Types

Show Simulation Source # 
Instance details

Defined in Playground.Types

Generic Simulation Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep Simulation :: Type -> Type Source #

ToJSON Simulation Source # 
Instance details

Defined in Playground.Types

FromJSON Simulation Source # 
Instance details

Defined in Playground.Types

type Rep Simulation Source # 
Instance details

Defined in Playground.Types

type Rep Simulation = D1 ('MetaData "Simulation" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "Simulation" 'PrefixI 'True) ((S1 ('MetaSel ('Just "simulationName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "simulationId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "simulationActions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SimulatorAction]) :*: S1 ('MetaSel ('Just "simulationWallets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SimulatorWallet]))))

data Evaluation Source #

Constructors

Evaluation 

Fields

Instances

Instances details
Generic Evaluation Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep Evaluation :: Type -> Type Source #

ToJSON Evaluation Source # 
Instance details

Defined in Playground.Types

FromJSON Evaluation Source # 
Instance details

Defined in Playground.Types

type Rep Evaluation Source # 
Instance details

Defined in Playground.Types

type Rep Evaluation = D1 ('MetaData "Evaluation" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "Evaluation" 'PrefixI 'True) (S1 ('MetaSel ('Just "wallets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SimulatorWallet]) :*: (S1 ('MetaSel ('Just "sourceCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceCode) :*: S1 ('MetaSel ('Just "program") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value))))

data EvaluationResult Source #

Constructors

EvaluationResult 

Fields

Instances

Instances details
Show EvaluationResult Source # 
Instance details

Defined in Playground.Types

Generic EvaluationResult Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep EvaluationResult :: Type -> Type Source #

ToJSON EvaluationResult Source # 
Instance details

Defined in Playground.Types

FromJSON EvaluationResult Source # 
Instance details

Defined in Playground.Types

type Rep EvaluationResult Source # 
Instance details

Defined in Playground.Types

type Rep EvaluationResult = D1 ('MetaData "EvaluationResult" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "EvaluationResult" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resultRollup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [[AnnotatedTx]]) :*: (S1 ('MetaSel ('Just "emulatorLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [EmulatorEvent]) :*: S1 ('MetaSel ('Just "emulatorTrace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "fundsDistribution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SimulatorWallet]) :*: (S1 ('MetaSel ('Just "feesDistribution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SimulatorWallet]) :*: S1 ('MetaSel ('Just "walletKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(PaymentPubKeyHash, WalletNumber)])))))

data CompilationResult Source #

Instances

Instances details
Eq CompilationResult Source # 
Instance details

Defined in Playground.Types

Show CompilationResult Source # 
Instance details

Defined in Playground.Types

Generic CompilationResult Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep CompilationResult :: Type -> Type Source #

ToJSON CompilationResult Source # 
Instance details

Defined in Playground.Types

type Rep CompilationResult Source # 
Instance details

Defined in Playground.Types

type Rep CompilationResult = D1 ('MetaData "CompilationResult" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "CompilationResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "functionSchema") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FunctionSchema FormSchema]) :*: S1 ('MetaSel ('Just "knownCurrencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [KnownCurrency])))

data ContractDemo Source #

Instances

Instances details
Eq ContractDemo Source # 
Instance details

Defined in Playground.Types

Show ContractDemo Source # 
Instance details

Defined in Playground.Types

Generic ContractDemo Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep ContractDemo :: Type -> Type Source #

ToJSON ContractDemo Source # 
Instance details

Defined in Playground.Types

type Rep ContractDemo Source # 
Instance details

Defined in Playground.Types

type Rep ContractDemo = D1 ('MetaData "ContractDemo" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "ContractDemo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "contractDemoName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "contractDemoEditorContents") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceCode)) :*: (S1 ('MetaSel ('Just "contractDemoSimulations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Simulation]) :*: S1 ('MetaSel ('Just "contractDemoContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (InterpreterResult CompilationResult)))))

data FunctionSchema a Source #

Constructors

FunctionSchema 

Fields

Instances

Instances details
Functor FunctionSchema Source # 
Instance details

Defined in Playground.Types

Methods

fmap :: (a -> b) -> FunctionSchema a -> FunctionSchema b Source #

(<$) :: a -> FunctionSchema b -> FunctionSchema a Source #

Foldable FunctionSchema Source # 
Instance details

Defined in Playground.Types

Methods

fold :: Monoid m => FunctionSchema m -> m Source #

foldMap :: Monoid m => (a -> m) -> FunctionSchema a -> m Source #

foldMap' :: Monoid m => (a -> m) -> FunctionSchema a -> m Source #

foldr :: (a -> b -> b) -> b -> FunctionSchema a -> b Source #

foldr' :: (a -> b -> b) -> b -> FunctionSchema a -> b Source #

foldl :: (b -> a -> b) -> b -> FunctionSchema a -> b Source #

foldl' :: (b -> a -> b) -> b -> FunctionSchema a -> b Source #

foldr1 :: (a -> a -> a) -> FunctionSchema a -> a Source #

foldl1 :: (a -> a -> a) -> FunctionSchema a -> a Source #

toList :: FunctionSchema a -> [a] Source #

null :: FunctionSchema a -> Bool Source #

length :: FunctionSchema a -> Int Source #

elem :: Eq a => a -> FunctionSchema a -> Bool Source #

maximum :: Ord a => FunctionSchema a -> a Source #

minimum :: Ord a => FunctionSchema a -> a Source #

sum :: Num a => FunctionSchema a -> a Source #

product :: Num a => FunctionSchema a -> a Source #

Traversable FunctionSchema Source # 
Instance details

Defined in Playground.Types

Methods

traverse :: Applicative f => (a -> f b) -> FunctionSchema a -> f (FunctionSchema b) Source #

sequenceA :: Applicative f => FunctionSchema (f a) -> f (FunctionSchema a) Source #

mapM :: Monad m => (a -> m b) -> FunctionSchema a -> m (FunctionSchema b) Source #

sequence :: Monad m => FunctionSchema (m a) -> m (FunctionSchema a) Source #

Eq a => Eq (FunctionSchema a) Source # 
Instance details

Defined in Playground.Types

Show a => Show (FunctionSchema a) Source # 
Instance details

Defined in Playground.Types

Generic (FunctionSchema a) Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep (FunctionSchema a) :: Type -> Type Source #

ToJSON a => ToJSON (FunctionSchema a) Source # 
Instance details

Defined in Playground.Types

FromJSON a => FromJSON (FunctionSchema a) Source # 
Instance details

Defined in Playground.Types

ToSchema a => ToSchema (FunctionSchema a) Source # 
Instance details

Defined in Playground.Types

type Rep (FunctionSchema a) Source # 
Instance details

Defined in Playground.Types

type Rep (FunctionSchema a) = D1 ('MetaData "FunctionSchema" "Playground.Types" "playground-common-0.1.0.0-LHGPmcl6mK723R6a6rRgpE" 'False) (C1 ('MetaCons "FunctionSchema" 'PrefixI 'True) (S1 ('MetaSel ('Just "endpointDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EndpointDescription) :*: S1 ('MetaSel ('Just "argument") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data PlaygroundError Source #

Instances

Instances details
Eq PlaygroundError Source # 
Instance details

Defined in Playground.Types

Show PlaygroundError Source # 
Instance details

Defined in Playground.Types

Generic PlaygroundError Source # 
Instance details

Defined in Playground.Types

Associated Types

type Rep PlaygroundError :: Type -> Type Source #

ToJSON PlaygroundError Source # 
Instance details

Defined in Playground.Types

FromJSON PlaygroundError Source # 
Instance details

Defined in Playground.Types

type Rep PlaygroundError Source # 
Instance details

Defined in Playground.Types