| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Cluster.Util
Description
Utilities used across hydra-cluster
Synopsis
- readConfigFile :: FilePath -> IO ByteString
- keysFor :: Actor -> IO (VerificationKey PaymentKey, SigningKey PaymentKey)
- createAndSaveSigningKey :: FilePath -> IO (SigningKey PaymentKey)
- chainConfigFor :: HasCallStack => Actor -> FilePath -> SocketPath -> [TxId] -> [Actor] -> ContestationPeriod -> DepositDeadline -> IO ChainConfig
- modifyConfig :: (DirectChainConfig -> DirectChainConfig) -> ChainConfig -> ChainConfig
- setNetworkId :: NetworkId -> ChainConfig -> ChainConfig
Documentation
readConfigFile :: FilePath -> IO ByteString Source #
Lookup a config file similar reading a file from disk.
If the env variable HYDRA_CONFIG_DIR is set, filenames will be
resolved relative to its value otherwise they will be looked up in the
package's data path.
keysFor :: Actor -> IO (VerificationKey PaymentKey, SigningKey PaymentKey) Source #
Get the "well-known" keys for given actor.
createAndSaveSigningKey :: FilePath -> IO (SigningKey PaymentKey) Source #
Create and save new signing key at the provided path.
NOTE: Uses TextEnvelope format.
Arguments
| :: HasCallStack | |
| => Actor | |
| -> FilePath | |
| -> SocketPath | |
| -> [TxId] | Transaction ids at which Hydra scripts should have been published. |
| -> [Actor] | |
| -> ContestationPeriod | |
| -> DepositDeadline | |
| -> IO ChainConfig |
modifyConfig :: (DirectChainConfig -> DirectChainConfig) -> ChainConfig -> ChainConfig Source #
setNetworkId :: NetworkId -> ChainConfig -> ChainConfig Source #