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

Hydra.Tx.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.Tx.Party

Methods

arbitrary :: Gen Party

shrink :: Party -> [Party]

FromJSON Party Source # 
Instance details

Defined in Hydra.Tx.Party

Methods

parseJSON :: Value -> Parser Party

parseJSONList :: Value -> Parser [Party]

omittedField :: Maybe Party

FromJSONKey Party Source # 
Instance details

Defined in Hydra.Tx.Party

Methods

fromJSONKey :: FromJSONKeyFunction Party

fromJSONKeyList :: FromJSONKeyFunction [Party]

ToJSON Party Source # 
Instance details

Defined in Hydra.Tx.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.Tx.Party

Methods

toJSONKey :: ToJSONKeyFunction Party

toJSONKeyList :: ToJSONKeyFunction [Party]

Generic Party Source # 
Instance details

Defined in Hydra.Tx.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.Tx.Party

FromCBOR Party Source # 
Instance details

Defined in Hydra.Tx.Party

Methods

fromCBOR :: Decoder s Party

label :: Proxy Party -> Text

ToCBOR Party Source # 
Instance details

Defined in Hydra.Tx.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.Tx.Party

Methods

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

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

Ord Party Source # 
Instance details

Defined in Hydra.Tx.Party

type Rep Party Source # 
Instance details

Defined in Hydra.Tx.Party

type Rep Party = D1 ('MetaData "Party" "Hydra.Tx.Party" "hydra-tx-0.19.0-CNt37yoHV6SLHPMLDZKDue" '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.Tx.Environment