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

Test.Cardano.Ledger.Core.KeyPair

Synopsis

Documentation

mkCredCrypto c ⇒ KeyPair kr c → Credential kr c Source #

data KeyPair (kd ∷ KeyRole) c Source #

Constructors

KeyPair 

Fields

Instances

Instances details
HasKeyRole KeyPair Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

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

Crypto c ⇒ Arbitrary (KeyPair kd c) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

arbitraryGen (KeyPair kd c) Source #

shrinkKeyPair kd c → [KeyPair kd c] Source #

Generic (KeyPair kd c) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Associated Types

type Rep (KeyPair kd c) ∷ TypeType Source #

Methods

fromKeyPair kd c → Rep (KeyPair kd c) x Source #

toRep (KeyPair kd c) x → KeyPair kd c Source #

Crypto c ⇒ Show (KeyPair kd c) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

showsPrecIntKeyPair kd c → ShowS Source #

showKeyPair kd c → String Source #

showList ∷ [KeyPair kd c] → ShowS Source #

(Crypto c, NFData (VerKeyDSIGN (DSIGN c)), NFData (SignKeyDSIGN (DSIGN c))) ⇒ NFData (KeyPair kd c) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

rnfKeyPair kd c → () Source #

Crypto c ⇒ NoThunks (KeyPair kd c) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Crypto c ⇒ Uniform (KeyPair kd c) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

Methods

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

type Rep (KeyPair kd c) Source # 
Instance details

Defined in Test.Cardano.Ledger.Core.KeyPair

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

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

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

mkWitnessVKey ∷ ∀ c kr. (Crypto c, DSignable c (Hash (HASH c) EraIndependentTxBody)) ⇒ SafeHash c EraIndependentTxBodyKeyPair kr c → WitVKey 'Witness c Source #

Create a witness for transaction

mkWitnessesVKey ∷ ∀ c kr. (Crypto c, DSignable c (Hash (HASH c) EraIndependentTxBody)) ⇒ SafeHash c EraIndependentTxBody → [KeyPair kr c] → Set (WitVKey 'Witness c) Source #

Create witnesses for transaction

makeWitnessesFromScriptKeys ∷ (Crypto c, DSignable c (Hash c EraIndependentTxBody)) ⇒ SafeHash c EraIndependentTxBodyMap (KeyHash kr c) (KeyPair kr c) → Set (KeyHash kr c) → Set (WitVKey 'Witness c) 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 StandardCrypto, SafeHash StandardCrypto EraIndependentTxBodyWitVKey 'Witness StandardCrypto) 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) ...

mkKeyPairCrypto c ⇒ IntKeyPair r c Source #

mkKeyPairWithSeed ∷ ∀ r c. Crypto c ⇒ ByteStringKeyPair r c Source #

mkKeyHashCrypto c ⇒ IntKeyHash kd c Source #

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.16.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)))