Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | None |
Language | GHC2021 |
GeniusYield.GYConfig
Description
Synopsis
- data GYCoreConfig = GYCoreConfig {}
- newtype Confidential a = Confidential a
- data GYCoreProviderInfo
- = GYNodeKupo {
- cpiSocketPath :: !FilePath
- cpiKupoUrl :: !Text
- cpiMempoolCache :: !(Maybe MempoolCacheSettings)
- cpiLocalTxSubmissionCache :: !(Maybe LocalTxSubmissionCacheSettings)
- | GYOgmiosKupo {
- cpiOgmiosUrl :: !Text
- cpiKupoUrl :: !Text
- cpiMempoolCache :: !(Maybe MempoolCacheSettings)
- cpiLocalTxSubmissionCache :: !(Maybe LocalTxSubmissionCacheSettings)
- | GYMaestro {
- cpiMaestroToken :: !(Confidential Text)
- cpiTurboSubmit :: !(Maybe Bool)
- | GYBlockfrost {
- cpiBlockfrostKey :: !(Confidential Text)
- = GYNodeKupo {
- withCfgProviders :: GYCoreConfig -> GYLogNamespace -> (GYProviders -> IO a) -> IO a
- coreConfigIO :: FilePath -> IO GYCoreConfig
- coreProviderIO :: FilePath -> IO GYCoreProviderInfo
- findMaestroTokenAndNetId :: [GYCoreConfig] -> IO (Text, GYNetworkId)
- isNodeKupo :: GYCoreProviderInfo -> Bool
- isOgmiosKupo :: GYCoreProviderInfo -> Bool
- isMaestro :: GYCoreProviderInfo -> Bool
- isBlockfrost :: GYCoreProviderInfo -> Bool
Documentation
data GYCoreConfig #
The config to initialize the GY framework with. Should include information on the providers to use, as well as the network id.
In JSON format, this essentially corresponds to:
{ coreProvider: GYCoreProviderInfo, networkId: NetworkId, logging: [GYLogScribeConfig], utxoCacheEnable: boolean }
Constructors
GYCoreConfig | |
Fields
|
Instances
FromJSON GYCoreConfig # | |
Defined in GeniusYield.GYConfig | |
Show GYCoreConfig # | |
Defined in GeniusYield.GYConfig Methods showsPrec :: Int -> GYCoreConfig -> ShowS # show :: GYCoreConfig -> String # showList :: [GYCoreConfig] -> ShowS # |
newtype Confidential a #
Newtype with a custom show instance that prevents showing the contained data.
Constructors
Confidential a |
Instances
data GYCoreProviderInfo #
The supported providers. The options are:
- Local node.socket along with Kupo
- Ogmios node instance along with Kupo
- Maestro blockchain API, provided its API token.
- Blockfrost API, provided its API key.
In JSON format, this essentially corresponds to:
{ socketPath: FilePath, kupoUrl: string, mempoolCache: { cacheInterval: number }, localTxSubmissionCache: { cacheInterval: number } }
| { ogmiosUrl: string, kupoUrl: string, mempoolCache: { cacheInterval: number }, localTxSubmissionCache: { cacheInterval: number } } | { maestroToken: string, turboSubmit: boolean } | { blockfrostKey: string }
The constructor tags don't need to appear in the JSON.
Constructors
GYNodeKupo | |
Fields
| |
GYOgmiosKupo | |
Fields
| |
GYMaestro | |
Fields
| |
GYBlockfrost | |
Fields
|
Instances
FromJSON GYCoreProviderInfo # | |
Defined in GeniusYield.GYConfig Methods parseJSON :: Value -> Parser GYCoreProviderInfo # parseJSONList :: Value -> Parser [GYCoreProviderInfo] # | |
Show GYCoreProviderInfo # | |
Defined in GeniusYield.GYConfig Methods showsPrec :: Int -> GYCoreProviderInfo -> ShowS # show :: GYCoreProviderInfo -> String # showList :: [GYCoreProviderInfo] -> ShowS # |
withCfgProviders :: GYCoreConfig -> GYLogNamespace -> (GYProviders -> IO a) -> IO a #
coreConfigIO :: FilePath -> IO GYCoreConfig #
findMaestroTokenAndNetId :: [GYCoreConfig] -> IO (Text, GYNetworkId) #
isNodeKupo :: GYCoreProviderInfo -> Bool #
isOgmiosKupo :: GYCoreProviderInfo -> Bool #
isMaestro :: GYCoreProviderInfo -> Bool #
isBlockfrost :: GYCoreProviderInfo -> Bool #