| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Cardano.Ledger.Core.KeyPair
Synopsis
- class MakeCredential c (r ∷ KeyRole) where
- mkCredential ∷ c → Credential r
- class MakeStakeReference c where
- mkStakeRef ∷ c → StakeReference
- mkAddr ∷ (MakeCredential p 'Payment, MakeStakeReference s) ⇒ p → s → Addr
- data KeyPair (kd ∷ KeyRole) = KeyPair {
- vKey ∷ !(VKey kd)
- sKey ∷ !(SignKeyDSIGN DSIGN)
- type KeyPairs = [(KeyPair 'Payment, KeyPair 'Staking)]
- mkWitnessVKey ∷ ∀ (kr ∷ KeyRole). SafeHash EraIndependentTxBody → KeyPair kr → WitVKey 'Witness
- mkWitnessesVKey ∷ ∀ (kr ∷ KeyRole). SafeHash EraIndependentTxBody → [KeyPair kr] → Set (WitVKey 'Witness)
- makeWitnessesFromScriptKeys ∷ ∀ (kr ∷ KeyRole). SafeHash EraIndependentTxBody → Map (KeyHash kr) (KeyPair kr) → Set (KeyHash kr) → Set (WitVKey 'Witness)
- mkKeyHashWitFunPair ∷ ∀ (kr ∷ KeyRole). Gen (KeyHash kr, SafeHash EraIndependentTxBody → WitVKey 'Witness)
- mkVKeyRewardAccount ∷ Network → KeyPair 'Staking → RewardAccount
- mkKeyPair ∷ ∀ (r ∷ KeyRole). Int → KeyPair r
- mkKeyPairWithSeed ∷ ∀ (r ∷ KeyRole). ByteString → KeyPair r
- mkKeyHash ∷ ∀ (kd ∷ KeyRole). Int → KeyHash kd
- data ByronKeyPair = ByronKeyPair {}
- mkBootKeyPairWithSeed ∷ ByteString → ByronKeyPair
- genByronVKeyAddr ∷ Gen (VerificationKey, Address)
- genByronAddrFromVKey ∷ VerificationKey → Gen Address
Documentation
class MakeCredential c (r ∷ KeyRole) where Source #
Methods
mkCredential ∷ c → Credential r Source #
Instances
| MakeCredential ScriptHash r Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair Methods mkCredential ∷ ScriptHash → Credential r Source # | |
| MakeCredential (Credential r) r Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair Methods mkCredential ∷ Credential r → Credential r Source # | |
| MakeCredential (KeyHash r) r Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair Methods mkCredential ∷ KeyHash r → Credential r Source # | |
| MakeCredential (KeyPair r) r Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair Methods mkCredential ∷ KeyPair r → Credential r Source # | |
class MakeStakeReference c where Source #
Minimal complete definition
Nothing
Methods
mkStakeRef ∷ c → StakeReference Source #
default mkStakeRef ∷ MakeCredential c 'Staking ⇒ c → StakeReference Source #
Instances
mkAddr ∷ (MakeCredential p 'Payment, MakeStakeReference s) ⇒ p → s → Addr Source #
Construct a Testnet address from payment and staking components
data KeyPair (kd ∷ KeyRole) Source #
Instances
type KeyPairs = [(KeyPair 'Payment, KeyPair 'Staking)] Source #
Representation of a list of pairs of key pairs, e.g., pay and stake keys
mkWitnessVKey ∷ ∀ (kr ∷ KeyRole). SafeHash EraIndependentTxBody → KeyPair kr → WitVKey 'Witness Source #
Create a witness for transaction
mkWitnessesVKey ∷ ∀ (kr ∷ KeyRole). SafeHash EraIndependentTxBody → [KeyPair kr] → Set (WitVKey 'Witness) Source #
Create witnesses for transaction
makeWitnessesFromScriptKeys ∷ ∀ (kr ∷ KeyRole). SafeHash EraIndependentTxBody → Map (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 ∷ KeyRole). Gen (KeyHash kr, SafeHash EraIndependentTxBody → WitVKey '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) ...
mkKeyPairWithSeed ∷ ∀ (r ∷ KeyRole). ByteString → KeyPair r Source #
data ByronKeyPair Source #
Constructors
| ByronKeyPair | |
Fields | |
Instances
| Arbitrary ByronKeyPair Source # | |||||
Defined in Test.Cardano.Ledger.Core.KeyPair | |||||
| Generic ByronKeyPair Source # | |||||
Defined in Test.Cardano.Ledger.Core.KeyPair Associated Types
| |||||
| Show ByronKeyPair Source # | |||||
Defined in Test.Cardano.Ledger.Core.KeyPair Methods showsPrec ∷ Int → ByronKeyPair → ShowS # show ∷ ByronKeyPair → String # showList ∷ [ByronKeyPair] → ShowS # | |||||
| Uniform ByronKeyPair Source # | |||||
Defined in Test.Cardano.Ledger.Core.KeyPair Methods uniformM ∷ StatefulGen g m ⇒ g → m ByronKeyPair Source # | |||||
| type Rep ByronKeyPair Source # | |||||
Defined in Test.Cardano.Ledger.Core.KeyPair type Rep ByronKeyPair = D1 ('MetaData "ByronKeyPair" "Test.Cardano.Ledger.Core.KeyPair" "cardano-ledger-core-1.19.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))) | |||||