Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Types and functions revolving around a Hydra Party
. That is, a
participant in a Hydra Head, which signs transactions or snapshots in the
Hydra protocol.
Synopsis
- newtype Party = Party {}
- deriveParty :: SigningKey HydraKey -> Party
- partyToChain :: Party -> Party
- partyFromChain :: MonadFail m => Party -> m Party
- class HasParty a where
Documentation
Identifies a party in a Hydra head by it's VerificationKey
.
Instances
Arbitrary Party Source # | |
FromJSON Party Source # | |
Defined in Hydra.Tx.Party parseJSON :: Value -> Parser Party parseJSONList :: Value -> Parser [Party] | |
FromJSONKey Party Source # | |
Defined in Hydra.Tx.Party fromJSONKey :: FromJSONKeyFunction Party fromJSONKeyList :: FromJSONKeyFunction [Party] | |
ToJSON Party Source # | |
Defined in Hydra.Tx.Party | |
ToJSONKey Party Source # | |
Defined in Hydra.Tx.Party toJSONKey :: ToJSONKeyFunction Party toJSONKeyList :: ToJSONKeyFunction [Party] | |
Generic Party Source # | |
Show Party Source # | |
FromCBOR Party Source # | |
ToCBOR Party Source # | |
Defined in Hydra.Tx.Party encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Party -> Size encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Party] -> Size | |
Eq Party Source # | |
Ord Party Source # | |
Defined in Hydra.Tx.Party | |
type Rep Party Source # | |
Defined in Hydra.Tx.Party type Rep Party = D1 ('MetaData "Party" "Hydra.Tx.Party" "hydra-tx-0.19.0-GruKCDFrYmltVsR6Cb5jZ" 'True) (C1 ('MetaCons "Party" 'PrefixI 'True) (S1 ('MetaSel ('Just "vkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VerificationKey HydraKey)))) |
deriveParty :: SigningKey HydraKey -> Party Source #
Get the Party
given some Hydra SigningKey
.
partyToChain :: Party -> Party Source #
partyFromChain :: MonadFail m => Party -> m Party Source #
Retrieve the "high-level" 'Party from the "low-level" on-chain
representation. This can fail because of the lower type-safety used on-chain
and a non-guaranteed verification key length. See Party
for an explanation why this is a distinct type.