| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.NetworkId
Description
Four-bit Shelley network identifiers, distinct from network magic.
import qualified Cometa.NetworkId as Network network :: Network.NetworkId network = Network.testnet
Documentation
Four-bit network tag, 0 through 15. Tag 1 denotes mainnet; every other
tag uses the test-network Bech32 prefix. This tag is not a network magic.
Equality and ordering compare the number; Show is diagnostic.
minBound is 0 and maxBound is 15.
Instances
| Bounded NetworkId Source # | |
| Show NetworkId Source # | |
| Eq NetworkId Source # | |
| Ord NetworkId Source # | |
mkNetworkId :: Integer -> Either Error NetworkId Source #
Validate a network tag. Values outside 0..15 return InvalidNetworkId.
networkIdValue :: NetworkId -> Word8 Source #
Numeric four-bit tag.