hydra-node-0.16.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

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

Documentation

newtype Party Source #

Identifies a party in a Hydra head by it's VerificationKey.

Constructors

Party 

Instances

Instances details
Arbitrary Party Source # 
Instance details

Defined in Hydra.Party

Methods

arbitrary :: Gen Party

shrink :: Party -> [Party]

FromJSON Party Source # 
Instance details

Defined in Hydra.Party

Methods

parseJSON :: Value -> Parser Party

parseJSONList :: Value -> Parser [Party]

omittedField :: Maybe Party

FromJSONKey Party Source # 
Instance details

Defined in Hydra.Party

Methods

fromJSONKey :: FromJSONKeyFunction Party

fromJSONKeyList :: FromJSONKeyFunction [Party]

ToJSON Party Source # 
Instance details

Defined in Hydra.Party

Methods

toJSON :: Party -> Value

toEncoding :: Party -> Encoding

toJSONList :: [Party] -> Value

toEncodingList :: [Party] -> Encoding

omitField :: Party -> Bool

ToJSONKey Party Source # 
Instance details

Defined in Hydra.Party

Methods

toJSONKey :: ToJSONKeyFunction Party

toJSONKeyList :: ToJSONKeyFunction [Party]

Generic Party Source # 
Instance details

Defined in Hydra.Party

Associated Types

type Rep Party :: Type -> Type Source #

Methods

from :: Party -> Rep Party x Source #

to :: Rep Party x -> Party Source #

Show Party Source # 
Instance details

Defined in Hydra.Party

FromCBOR Party Source # 
Instance details

Defined in Hydra.Party

Methods

fromCBOR :: Decoder s Party

label :: Proxy Party -> Text

ToCBOR Party Source # 
Instance details

Defined in Hydra.Party

Methods

toCBOR :: Party -> Encoding

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 # 
Instance details

Defined in Hydra.Party

Methods

(==) :: Party -> Party -> Bool Source #

(/=) :: Party -> Party -> Bool Source #

Ord Party Source # 
Instance details

Defined in Hydra.Party

type Rep Party Source # 
Instance details

Defined in Hydra.Party

type Rep Party = D1 ('MetaData "Party" "Hydra.Party" "hydra-node-0.16.0-C0XGScKIquG5I6dPp21445" '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 #

Convert "high-level" Party to the "low-level" representation as used on-chain. See Party for an explanation why this is a distinct type.

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.

Methods

getParty :: a -> Party Source #

Instances

Instances details
HasParty Environment Source # 
Instance details

Defined in Hydra.Environment

HasParty (DraftHydraNode tx m) Source # 
Instance details

Defined in Hydra.Node

HasParty (HydraNode tx m) Source # 
Instance details

Defined in Hydra.Node

Methods

getParty :: HydraNode tx m -> Party Source #