cardano-ledger-core-1.17.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Core.KeyPair

Synopsis

Documentation

data KeyPair (kd ∷ KeyRole) Source #

Constructors

KeyPair 

Fields

Instances

Instances details
HasKeyRole KeyPair Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

coerceKeyRole ∷ ∀ (r ∷ KeyRole) (r' ∷ KeyRole). KeyPair r → KeyPair r' Source #

Arbitrary (KeyPair kd) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

arbitraryGen (KeyPair kd) Source #

shrinkKeyPair kd → [KeyPair kd] Source #

Generic (KeyPair kd) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Associated Types

type Rep (KeyPair kd) ∷ TypeType Source #

Methods

fromKeyPair kd → Rep (KeyPair kd) x Source #

toRep (KeyPair kd) x → KeyPair kd Source #

Show (KeyPair kd) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

showsPrecIntKeyPair kd → ShowS Source #

showKeyPair kd → String Source #

showList ∷ [KeyPair kd] → ShowS Source #

Typeable r ⇒ EncCBOR (KeyPair r) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

encCBORKeyPair r → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (KeyPair r) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [KeyPair r] → Size Source #

NFData (KeyPair kd) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

rnfKeyPair kd → () Source #

Typeable r ⇒ Eq (KeyPair r) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

(==)KeyPair r → KeyPair r → Bool Source #

(/=)KeyPair r → KeyPair r → Bool Source #

NoThunks (KeyPair kd) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Uniform (KeyPair kd) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

uniformMStatefulGen g m ⇒ g → m (KeyPair kd) Source #

ToExpr (KeyPair r) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

toExprKeyPair r → Expr Source #

listToExpr ∷ [KeyPair r] → Expr Source #

type Rep (KeyPair kd) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

type Rep (KeyPair kd) = D1 ('MetaData "KeyPair" "Test.Cardano.Ledger.Core.KeyPair" "cardano-ledger-core-1.17.0.0-inplace-testlib" 'False) (C1 ('MetaCons "KeyPair" 'PrefixI 'True) (S1 ('MetaSel ('Just "vKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VKey kd)) :*: S1 ('MetaSel ('Just "sKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyDSIGN DSIGN))))

type KeyPairs = [(KeyPair 'Payment, KeyPair 'Staking)] Source #

Representation of a list of pairs of key pairs, e.g., pay and stake keys

mkWitnessVKeySafeHash EraIndependentTxBodyKeyPair kr → WitVKey 'Witness Source #

Create a witness for transaction

mkWitnessesVKeySafeHash EraIndependentTxBody → [KeyPair kr] → Set (WitVKey 'Witness) Source #

Create witnesses for transaction

makeWitnessesFromScriptKeysSafeHash EraIndependentTxBodyMap (KeyHash kr) (KeyPair kr) → Set (KeyHash kr) → Set (WitVKey 'Witness) Source #

From a list of key pairs and a set of key hashes required for a multi-sig scripts, return the set of required keys.

mkKeyHashWitFunPair ∷ ∀ kr. Gen (KeyHash kr, SafeHash EraIndependentTxBodyWitVKey 'Witness) Source #

When wrting a test which needs a KeyHash, and you will also later need a witness for that function, use keyHashWitFunPair. Since one cannot make a witness until one has SafeHash of the TxBody that the KeyHash is embedded. The second part of the pair is a (SafeHash to WitVKey) function. Use it something like this do (key,witfun) <- keyHashWitFunPair txbody <- ... key ... let safehash = hashAnnotated txbody tx = ... txbody ... (witfun safehash) ...

data ByronKeyPair Source #

Instances

Instances details
Arbitrary ByronKeyPair Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Generic ByronKeyPair Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Associated Types

type Rep ByronKeyPairTypeType Source #

Show ByronKeyPair Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Uniform ByronKeyPair Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

uniformMStatefulGen g m ⇒ g → m ByronKeyPair Source #

type Rep ByronKeyPair Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

type Rep ByronKeyPair = D1 ('MetaData "ByronKeyPair" "Test.Cardano.Ledger.Core.KeyPair" "cardano-ledger-core-1.17.0.0-inplace-testlib" 'False) (C1 ('MetaCons "ByronKeyPair" 'PrefixI 'True) (S1 ('MetaSel ('Just "bkpVerificationKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 VerificationKey) :*: S1 ('MetaSel ('Just "bkpSigningKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SigningKey)))