cometa-0.1.0.0: Idiomatic Haskell bindings to cardano-c
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cometa.NetworkId

Description

Four-bit Shelley network identifiers, distinct from network magic.

import qualified Cometa.NetworkId as Network

network :: Network.NetworkId
network = Network.testnet
Synopsis

Documentation

data NetworkId Source #

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

Instances details
Bounded NetworkId Source # 
Instance details

Defined in Cometa.NetworkId

Show NetworkId Source # 
Instance details

Defined in Cometa.NetworkId

Eq NetworkId Source # 
Instance details

Defined in Cometa.NetworkId

Ord NetworkId Source # 
Instance details

Defined in Cometa.NetworkId

mkNetworkId :: Integer -> Either Error NetworkId Source #

Validate a network tag. Values outside 0..15 return InvalidNetworkId.

networkIdValue :: NetworkId -> Word8 Source #

Numeric four-bit tag.

mainnet :: NetworkId Source #

Mainnet tag 1.

testnet :: NetworkId Source #

Conventional test-network tag 0. Does not distinguish preview or preprod.