hydra-tx-0.19.0: Hydra transaction library
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Tx.HeadId

Synopsis

Documentation

newtype HeadId Source #

Uniquely identifies a Hydra Head.

Constructors

UnsafeHeadId ByteString 

Instances

Instances details
Arbitrary HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Methods

arbitrary :: Gen HeadId

shrink :: HeadId -> [HeadId]

FromJSON HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Methods

parseJSON :: Value -> Parser HeadId

parseJSONList :: Value -> Parser [HeadId]

omittedField :: Maybe HeadId

ToJSON HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Methods

toJSON :: HeadId -> Value

toEncoding :: HeadId -> Encoding

toJSONList :: [HeadId] -> Value

toEncodingList :: [HeadId] -> Encoding

omitField :: HeadId -> Bool

Generic HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Associated Types

type Rep HeadId :: Type -> Type Source #

Show HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

HasTypeProxy HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Associated Types

data AsType HeadId #

SerialiseAsRawBytes HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

FromCBOR HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Methods

fromCBOR :: Decoder s HeadId

label :: Proxy HeadId -> Text

ToCBOR HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Methods

toCBOR :: HeadId -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy HeadId -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [HeadId] -> Size

Eq HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

Ord HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

type Rep HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

type Rep HeadId = D1 ('MetaData "HeadId" "Hydra.Tx.HeadId" "hydra-tx-0.19.0-CNt37yoHV6SLHPMLDZKDue" 'True) (C1 ('MetaCons "UnsafeHeadId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))
data AsType HeadId Source # 
Instance details

Defined in Hydra.Tx.HeadId

newtype HeadSeed Source #

Unique seed to create a HeadId

XXX: This might actually be the HeadId to the protocol and users? Then the policy id of the cardano-specific implementation (being the result of minting policy + seed) stays internal. A drawback is, that the seed is not such a good "key" to find things about this head on explorers and indexers.

Instances

Instances details
Arbitrary HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

FromJSON HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

Methods

parseJSON :: Value -> Parser HeadSeed

parseJSONList :: Value -> Parser [HeadSeed]

omittedField :: Maybe HeadSeed

ToJSON HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

Methods

toJSON :: HeadSeed -> Value

toEncoding :: HeadSeed -> Encoding

toJSONList :: [HeadSeed] -> Value

toEncodingList :: [HeadSeed] -> Encoding

omitField :: HeadSeed -> Bool

Generic HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

Associated Types

type Rep HeadSeed :: Type -> Type Source #

Show HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

HasTypeProxy HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

Associated Types

data AsType HeadSeed #

SerialiseAsRawBytes HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

Eq HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

Ord HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

type Rep HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

type Rep HeadSeed = D1 ('MetaData "HeadSeed" "Hydra.Tx.HeadId" "hydra-tx-0.19.0-CNt37yoHV6SLHPMLDZKDue" 'True) (C1 ('MetaCons "UnsafeHeadSeed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))
data AsType HeadSeed Source # 
Instance details

Defined in Hydra.Tx.HeadId

headIdToCurrencySymbol :: HeadId -> CurrencySymbol Source #

fromCurrencySymbol :: MonadFail m => CurrencySymbol -> m HeadId Source #

mkHeadId :: PolicyId -> HeadId Source #