This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jamie Bertram
committed
Jan 24, 2022
1 parent
3c0a558
commit d51db0a
Showing
53 changed files
with
9,347 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
plutus-pab-executables/demo/pab-nami/client/generated/Auth.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
-- File auto generated by purescript-bridge! -- | ||
module Auth where | ||
|
||
import Prelude | ||
import Control.Lazy (defer) | ||
import Data.Argonaut.Core (jsonNull) | ||
import Data.Argonaut.Decode (class DecodeJson) | ||
import Data.Argonaut.Decode.Aeson ((</$\>), (</*\>), (</\>)) | ||
import Data.Argonaut.Encode (class EncodeJson, encodeJson) | ||
import Data.Argonaut.Encode.Aeson ((>$<), (>/\<)) | ||
import Data.Bounded.Generic (genericBottom, genericTop) | ||
import Data.Enum (class Enum) | ||
import Data.Enum.Generic (genericPred, genericSucc) | ||
import Data.Generic.Rep (class Generic) | ||
import Data.Lens (Iso', Lens', Prism', iso, prism') | ||
import Data.Lens.Iso.Newtype (_Newtype) | ||
import Data.Lens.Record (prop) | ||
import Data.Maybe (Maybe(..)) | ||
import Data.Newtype (class Newtype, unwrap) | ||
import Data.Show.Generic (genericShow) | ||
import Data.Tuple.Nested ((/\)) | ||
import Type.Proxy (Proxy(Proxy)) | ||
import Data.Argonaut.Decode.Aeson as D | ||
import Data.Argonaut.Encode.Aeson as E | ||
import Data.Map as Map | ||
|
||
newtype AuthStatus | ||
= AuthStatus { _authStatusAuthRole :: AuthRole } | ||
|
||
derive instance eqAuthStatus :: Eq AuthStatus | ||
|
||
instance showAuthStatus :: Show AuthStatus where | ||
show a = genericShow a | ||
|
||
instance encodeJsonAuthStatus :: EncodeJson AuthStatus where | ||
encodeJson = | ||
defer \_ -> | ||
E.encode $ unwrap | ||
>$< ( E.record | ||
{ _authStatusAuthRole: E.value :: _ AuthRole } | ||
) | ||
|
||
instance decodeJsonAuthStatus :: DecodeJson AuthStatus where | ||
decodeJson = defer \_ -> D.decode $ (AuthStatus <$> D.record "AuthStatus" { _authStatusAuthRole: D.value :: _ AuthRole }) | ||
|
||
derive instance genericAuthStatus :: Generic AuthStatus _ | ||
|
||
derive instance newtypeAuthStatus :: Newtype AuthStatus _ | ||
|
||
-------------------------------------------------------------------------------- | ||
_AuthStatus :: Iso' AuthStatus { _authStatusAuthRole :: AuthRole } | ||
_AuthStatus = _Newtype | ||
|
||
authStatusAuthRole :: Lens' AuthStatus AuthRole | ||
authStatusAuthRole = _Newtype <<< prop (Proxy :: _ "_authStatusAuthRole") | ||
|
||
-------------------------------------------------------------------------------- | ||
data AuthRole | ||
= Anonymous | ||
| GithubUser | ||
|
||
derive instance eqAuthRole :: Eq AuthRole | ||
|
||
derive instance ordAuthRole :: Ord AuthRole | ||
|
||
instance showAuthRole :: Show AuthRole where | ||
show a = genericShow a | ||
|
||
instance encodeJsonAuthRole :: EncodeJson AuthRole where | ||
encodeJson = defer \_ -> E.encode E.enum | ||
|
||
instance decodeJsonAuthRole :: DecodeJson AuthRole where | ||
decodeJson = defer \_ -> D.decode D.enum | ||
|
||
derive instance genericAuthRole :: Generic AuthRole _ | ||
|
||
instance enumAuthRole :: Enum AuthRole where | ||
succ = genericSucc | ||
pred = genericPred | ||
|
||
instance boundedAuthRole :: Bounded AuthRole where | ||
bottom = genericBottom | ||
top = genericTop | ||
|
||
-------------------------------------------------------------------------------- | ||
_Anonymous :: Prism' AuthRole Unit | ||
_Anonymous = | ||
prism' (const Anonymous) case _ of | ||
Anonymous -> Just unit | ||
_ -> Nothing | ||
|
||
_GithubUser :: Prism' AuthRole Unit | ||
_GithubUser = | ||
prism' (const GithubUser) case _ of | ||
GithubUser -> Just unit | ||
_ -> Nothing |
62 changes: 62 additions & 0 deletions
62
plutus-pab-executables/demo/pab-nami/client/generated/Cardano/Wallet/Mock/Types.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
-- File auto generated by purescript-bridge! -- | ||
module Cardano.Wallet.Mock.Types where | ||
|
||
import Prelude | ||
import Control.Lazy (defer) | ||
import Data.Argonaut.Core (jsonNull) | ||
import Data.Argonaut.Decode (class DecodeJson) | ||
import Data.Argonaut.Decode.Aeson ((</$\>), (</*\>), (</\>)) | ||
import Data.Argonaut.Encode (class EncodeJson, encodeJson) | ||
import Data.Argonaut.Encode.Aeson ((>$<), (>/\<)) | ||
import Data.Generic.Rep (class Generic) | ||
import Data.Lens (Iso', Lens', Prism', iso, prism') | ||
import Data.Lens.Iso.Newtype (_Newtype) | ||
import Data.Lens.Record (prop) | ||
import Data.Maybe (Maybe(..)) | ||
import Data.Newtype (class Newtype, unwrap) | ||
import Data.Show.Generic (genericShow) | ||
import Data.Tuple.Nested ((/\)) | ||
import Ledger.Address (PaymentPubKeyHash) | ||
import Type.Proxy (Proxy(Proxy)) | ||
import Wallet.Emulator.Wallet (Wallet) | ||
import Data.Argonaut.Decode.Aeson as D | ||
import Data.Argonaut.Encode.Aeson as E | ||
import Data.Map as Map | ||
|
||
newtype WalletInfo | ||
= WalletInfo | ||
{ wiWallet :: Wallet | ||
, wiPaymentPubKeyHash :: PaymentPubKeyHash | ||
} | ||
|
||
instance showWalletInfo :: Show WalletInfo where | ||
show a = genericShow a | ||
|
||
instance encodeJsonWalletInfo :: EncodeJson WalletInfo where | ||
encodeJson = | ||
defer \_ -> | ||
E.encode $ unwrap | ||
>$< ( E.record | ||
{ wiWallet: E.value :: _ Wallet | ||
, wiPaymentPubKeyHash: E.value :: _ PaymentPubKeyHash | ||
} | ||
) | ||
|
||
instance decodeJsonWalletInfo :: DecodeJson WalletInfo where | ||
decodeJson = | ||
defer \_ -> | ||
D.decode | ||
$ ( WalletInfo | ||
<$> D.record "WalletInfo" | ||
{ wiWallet: D.value :: _ Wallet | ||
, wiPaymentPubKeyHash: D.value :: _ PaymentPubKeyHash | ||
} | ||
) | ||
|
||
derive instance genericWalletInfo :: Generic WalletInfo _ | ||
|
||
derive instance newtypeWalletInfo :: Newtype WalletInfo _ | ||
|
||
-------------------------------------------------------------------------------- | ||
_WalletInfo :: Iso' WalletInfo { wiWallet :: Wallet, wiPaymentPubKeyHash :: PaymentPubKeyHash } | ||
_WalletInfo = _Newtype |
67 changes: 67 additions & 0 deletions
67
plutus-pab-executables/demo/pab-nami/client/generated/Control/Monad/Freer/Extras/Beam.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
-- File auto generated by purescript-bridge! -- | ||
module Control.Monad.Freer.Extras.Beam where | ||
|
||
import Prelude | ||
import Control.Lazy (defer) | ||
import Data.Argonaut.Core (jsonNull) | ||
import Data.Argonaut.Decode (class DecodeJson) | ||
import Data.Argonaut.Decode.Aeson ((</$\>), (</*\>), (</\>)) | ||
import Data.Argonaut.Encode (class EncodeJson, encodeJson) | ||
import Data.Argonaut.Encode.Aeson ((>$<), (>/\<)) | ||
import Data.Generic.Rep (class Generic) | ||
import Data.Lens (Iso', Lens', Prism', iso, prism') | ||
import Data.Lens.Iso.Newtype (_Newtype) | ||
import Data.Lens.Record (prop) | ||
import Data.Maybe (Maybe(..)) | ||
import Data.Newtype (class Newtype, unwrap) | ||
import Data.Show.Generic (genericShow) | ||
import Data.Tuple.Nested ((/\)) | ||
import Type.Proxy (Proxy(Proxy)) | ||
import Data.Argonaut.Decode.Aeson as D | ||
import Data.Argonaut.Encode.Aeson as E | ||
import Data.Map as Map | ||
|
||
newtype BeamError | ||
= SqlError String | ||
|
||
derive instance eqBeamError :: Eq BeamError | ||
|
||
instance showBeamError :: Show BeamError where | ||
show a = genericShow a | ||
|
||
instance encodeJsonBeamError :: EncodeJson BeamError where | ||
encodeJson = defer \_ -> E.encode $ unwrap >$< E.value | ||
|
||
instance decodeJsonBeamError :: DecodeJson BeamError where | ||
decodeJson = defer \_ -> D.decode $ (SqlError <$> D.value) | ||
|
||
derive instance genericBeamError :: Generic BeamError _ | ||
|
||
derive instance newtypeBeamError :: Newtype BeamError _ | ||
|
||
-------------------------------------------------------------------------------- | ||
_SqlError :: Iso' BeamError String | ||
_SqlError = _Newtype | ||
|
||
-------------------------------------------------------------------------------- | ||
newtype BeamLog | ||
= SqlLog String | ||
|
||
derive instance eqBeamLog :: Eq BeamLog | ||
|
||
instance showBeamLog :: Show BeamLog where | ||
show a = genericShow a | ||
|
||
instance encodeJsonBeamLog :: EncodeJson BeamLog where | ||
encodeJson = defer \_ -> E.encode $ unwrap >$< E.value | ||
|
||
instance decodeJsonBeamLog :: DecodeJson BeamLog where | ||
decodeJson = defer \_ -> D.decode $ (SqlLog <$> D.value) | ||
|
||
derive instance genericBeamLog :: Generic BeamLog _ | ||
|
||
derive instance newtypeBeamLog :: Newtype BeamLog _ | ||
|
||
-------------------------------------------------------------------------------- | ||
_SqlLog :: Iso' BeamLog String | ||
_SqlLog = _Newtype |
154 changes: 154 additions & 0 deletions
154
plutus-pab-executables/demo/pab-nami/client/generated/Control/Monad/Freer/Extras/Log.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
-- File auto generated by purescript-bridge! -- | ||
module Control.Monad.Freer.Extras.Log where | ||
|
||
import Prelude | ||
import Control.Lazy (defer) | ||
import Data.Argonaut.Core (jsonNull) | ||
import Data.Argonaut.Decode (class DecodeJson) | ||
import Data.Argonaut.Decode.Aeson ((</$\>), (</*\>), (</\>)) | ||
import Data.Argonaut.Encode (class EncodeJson, encodeJson) | ||
import Data.Argonaut.Encode.Aeson ((>$<), (>/\<)) | ||
import Data.Bounded.Generic (genericBottom, genericTop) | ||
import Data.Enum (class Enum) | ||
import Data.Enum.Generic (genericPred, genericSucc) | ||
import Data.Generic.Rep (class Generic) | ||
import Data.Lens (Iso', Lens', Prism', iso, prism') | ||
import Data.Lens.Iso.Newtype (_Newtype) | ||
import Data.Lens.Record (prop) | ||
import Data.Maybe (Maybe(..)) | ||
import Data.Newtype (class Newtype, unwrap) | ||
import Data.Show.Generic (genericShow) | ||
import Data.Tuple.Nested ((/\)) | ||
import Type.Proxy (Proxy(Proxy)) | ||
import Data.Argonaut.Decode.Aeson as D | ||
import Data.Argonaut.Encode.Aeson as E | ||
import Data.Map as Map | ||
|
||
newtype LogMessage a | ||
= LogMessage | ||
{ _logLevel :: LogLevel | ||
, _logMessageContent :: a | ||
} | ||
|
||
derive instance eqLogMessage :: (Eq a) => Eq (LogMessage a) | ||
|
||
instance showLogMessage :: (Show a) => Show (LogMessage a) where | ||
show a = genericShow a | ||
|
||
instance encodeJsonLogMessage :: (EncodeJson a) => EncodeJson (LogMessage a) where | ||
encodeJson = | ||
defer \_ -> | ||
E.encode $ unwrap | ||
>$< ( E.record | ||
{ _logLevel: E.value :: _ LogLevel | ||
, _logMessageContent: E.value :: _ a | ||
} | ||
) | ||
|
||
instance decodeJsonLogMessage :: (DecodeJson a) => DecodeJson (LogMessage a) where | ||
decodeJson = | ||
defer \_ -> | ||
D.decode | ||
$ ( LogMessage | ||
<$> D.record "LogMessage" | ||
{ _logLevel: D.value :: _ LogLevel | ||
, _logMessageContent: D.value :: _ a | ||
} | ||
) | ||
|
||
derive instance genericLogMessage :: Generic (LogMessage a) _ | ||
|
||
derive instance newtypeLogMessage :: Newtype (LogMessage a) _ | ||
|
||
-------------------------------------------------------------------------------- | ||
_LogMessage :: forall a. Iso' (LogMessage a) { _logLevel :: LogLevel, _logMessageContent :: a } | ||
_LogMessage = _Newtype | ||
|
||
logLevel :: forall a. Lens' (LogMessage a) LogLevel | ||
logLevel = _Newtype <<< prop (Proxy :: _ "_logLevel") | ||
|
||
logMessageContent :: forall a. Lens' (LogMessage a) a | ||
logMessageContent = _Newtype <<< prop (Proxy :: _ "_logMessageContent") | ||
|
||
-------------------------------------------------------------------------------- | ||
data LogLevel | ||
= Debug | ||
| Info | ||
| Notice | ||
| Warning | ||
| Error | ||
| Critical | ||
| Alert | ||
| Emergency | ||
|
||
derive instance eqLogLevel :: Eq LogLevel | ||
|
||
derive instance ordLogLevel :: Ord LogLevel | ||
|
||
instance showLogLevel :: Show LogLevel where | ||
show a = genericShow a | ||
|
||
instance encodeJsonLogLevel :: EncodeJson LogLevel where | ||
encodeJson = defer \_ -> E.encode E.enum | ||
|
||
instance decodeJsonLogLevel :: DecodeJson LogLevel where | ||
decodeJson = defer \_ -> D.decode D.enum | ||
|
||
derive instance genericLogLevel :: Generic LogLevel _ | ||
|
||
instance enumLogLevel :: Enum LogLevel where | ||
succ = genericSucc | ||
pred = genericPred | ||
|
||
instance boundedLogLevel :: Bounded LogLevel where | ||
bottom = genericBottom | ||
top = genericTop | ||
|
||
-------------------------------------------------------------------------------- | ||
_Debug :: Prism' LogLevel Unit | ||
_Debug = | ||
prism' (const Debug) case _ of | ||
Debug -> Just unit | ||
_ -> Nothing | ||
|
||
_Info :: Prism' LogLevel Unit | ||
_Info = | ||
prism' (const Info) case _ of | ||
Info -> Just unit | ||
_ -> Nothing | ||
|
||
_Notice :: Prism' LogLevel Unit | ||
_Notice = | ||
prism' (const Notice) case _ of | ||
Notice -> Just unit | ||
_ -> Nothing | ||
|
||
_Warning :: Prism' LogLevel Unit | ||
_Warning = | ||
prism' (const Warning) case _ of | ||
Warning -> Just unit | ||
_ -> Nothing | ||
|
||
_Error :: Prism' LogLevel Unit | ||
_Error = | ||
prism' (const Error) case _ of | ||
Error -> Just unit | ||
_ -> Nothing | ||
|
||
_Critical :: Prism' LogLevel Unit | ||
_Critical = | ||
prism' (const Critical) case _ of | ||
Critical -> Just unit | ||
_ -> Nothing | ||
|
||
_Alert :: Prism' LogLevel Unit | ||
_Alert = | ||
prism' (const Alert) case _ of | ||
Alert -> Just unit | ||
_ -> Nothing | ||
|
||
_Emergency :: Prism' LogLevel Unit | ||
_Emergency = | ||
prism' (const Emergency) case _ of | ||
Emergency -> Just unit | ||
_ -> Nothing |
Oops, something went wrong.