| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Pigy.Types
Description
Types for the pig-image service.
Synopsis
- data Configuration = Configuration {
- socketPath :: FilePath
- magic :: Maybe Word32
- epochSlots :: Word64
- policyId :: String
- assetName :: String
- keyInfo :: KeyInfo
- ipfsScript :: FilePath
- imageFolder :: FilePath
- mode :: Mode
- quiet :: Bool
- data Mode
- = Strict
- | Lenient
- | Aggressive
- data KeyInfo = KeyInfo {
- addressString :: String
- verificationKeyFile :: FilePath
- signingKeyFile :: FilePath
- data Context = Context {}
- data KeyedAddress = KeyedAddress {
- keyAddress :: AddressInEra MaryEra
- verificationHash :: Hash PaymentKey
- verification :: SomePaymentVerificationKey
- signing :: SigningKey PaymentExtendedKey
- readConfiguration :: MonadIO m => FilePath -> MantisM m Configuration
- makeContext :: MonadFail m => MonadIO m => Configuration -> MantisM m Context
- readKeyedAddress :: MonadIO m => KeyInfo -> MantisM m KeyedAddress
Documentation
data Configuration Source #
The service configuration.
Constructors
| Configuration | |
Fields
| |
Instances
| Read Configuration Source # | |
Defined in Pigy.Types Methods readsPrec :: Int -> ReadS Configuration readList :: ReadS [Configuration] readPrec :: ReadPrec Configuration readListPrec :: ReadPrec [Configuration] | |
| Show Configuration Source # | |
Defined in Pigy.Types Methods showsPrec :: Int -> Configuration -> ShowS show :: Configuration -> String showList :: [Configuration] -> ShowS | |
The operational mode.
Constructors
| Strict | Only accept requests as single transactions. |
| Lenient | Accept split transactions, processing when idle. |
| Aggressive | Accept split transactions, processing as soon as possible. |
Key information.
Constructors
| KeyInfo | |
Fields
| |
The contetual parameters for the service.
Constructors
| Context | |
Fields
| |
data KeyedAddress Source #
A key and it hashes.
Constructors
| KeyedAddress | |
Fields
| |
Instances
| Show KeyedAddress Source # | |
Defined in Pigy.Types Methods showsPrec :: Int -> KeyedAddress -> ShowS show :: KeyedAddress -> String showList :: [KeyedAddress] -> ShowS | |
Arguments
| :: MonadIO m | |
| => FilePath | The path to the configuration file. |
| -> MantisM m Configuration | The action returning the configuration. |
Read a configuration file.
Arguments
| :: MonadFail m | |
| => MonadIO m | |
| => Configuration | The configuration. |
| -> MantisM m Context | The action returning the context. |
Convert a configuration into a service context.
Arguments
| :: MonadIO m | |
| => KeyInfo | The key information. |
| -> MantisM m KeyedAddress | The key and its hashes. |
Read a key.