hydra-plutus-0.20.0: Hydra Plutus Contracts
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Data.Party

Synopsis

Documentation

newtype Party Source #

On-chain representation of a Hydra party.

NOTE: This roughly corresponds to the Party in 'hydra-node', but is simplified to allow usage of this type in plutus-tx. If we would use the complex type directly, which is based on 'cardano-crypto-class', we would get errors like "Error: Unsupported feature: Kind: GHC.Types.Nat".

The data constructor should not be used to construct this value as it would always come from off-chain code via partyFromVerificationKeyBytes.

Constructors

UnsafeParty 

Fields

  • vkey :: BuiltinByteString
     

Instances

Instances details
Arbitrary Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

arbitrary :: Gen Party

shrink :: Party -> [Party]

FromJSON Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

parseJSON :: Value -> Parser Party

parseJSONList :: Value -> Parser [Party]

omittedField :: Maybe Party

ToJSON Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

toJSON :: Party -> Value

toEncoding :: Party -> Encoding

toJSONList :: [Party] -> Value

toEncodingList :: [Party] -> Encoding

omitField :: Party -> Bool

Generic Party Source # 
Instance details

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

Eq Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

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

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

Eq Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

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

FromData Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

fromBuiltinData :: BuiltinData -> Maybe Party

ToData Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

toBuiltinData :: Party -> BuiltinData

UnsafeFromData Party Source # 
Instance details

Defined in Hydra.Data.Party

Methods

unsafeFromBuiltinData :: BuiltinData -> Party

type Rep Party Source # 
Instance details

Defined in Hydra.Data.Party

type Rep Party = D1 ('MetaData "Party" "Hydra.Data.Party" "hydra-plutus-0.20.0-IsbXaBXaexydgY5jFspDP" 'True) (C1 ('MetaCons "UnsafeParty" 'PrefixI 'True) (S1 ('MetaSel ('Just "vkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

partyFromVerificationKeyBytes :: ByteString -> Party Source #

Create an on-chain Party from some verification key bytes.

partyToVerficationKeyBytes :: Party -> ByteString Source #

Get the verification key bytes contained from an on-chain Party.