Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Hydra.Party
Description
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
.
Constructors
Party | |
Fields |
Instances
Arbitrary Party Source # | |
FromJSON Party Source # | |
Defined in Hydra.Party | |
FromJSONKey Party Source # | |
Defined in Hydra.Party | |
ToJSON Party Source # | |
Defined in Hydra.Party Methods toEncoding :: Party -> Encoding toJSONList :: [Party] -> Value toEncodingList :: [Party] -> Encoding | |
ToJSONKey Party Source # | |
Defined in Hydra.Party | |
Generic Party Source # | |
Show Party Source # | |
FromCBOR Party Source # | |
ToCBOR Party Source # | |
Defined in Hydra.Party Methods 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.Party | |
type Rep Party Source # | |
Defined in Hydra.Party type Rep Party = D1 ('MetaData "Party" "Hydra.Party" "hydra-node-0.18.1-74U5N9ddXPsInnBOsjbGdp" '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.
class HasParty a where Source #
Type class to retrieve the Party
from some type.
Instances
HasParty Environment Source # | |
Defined in Hydra.Environment Methods getParty :: Environment -> Party Source # | |
HasParty (DraftHydraNode tx m) Source # | |
Defined in Hydra.Node Methods getParty :: DraftHydraNode tx m -> Party Source # | |
HasParty (HydraNode tx m) Source # | |