Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mkAddr ∷ (KeyPair 'Payment, KeyPair 'Staking) → Addr
- mkScriptAddr ∷ ScriptHash → KeyPair 'Staking → Addr
- mkCred ∷ KeyPair kr → Credential kr
- data KeyPair (kd ∷ KeyRole) = KeyPair {
- vKey ∷ !(VKey kd)
- sKey ∷ !(SignKeyDSIGN DSIGN)
- type KeyPairs = [(KeyPair 'Payment, KeyPair 'Staking)]
- mkWitnessVKey ∷ SafeHash EraIndependentTxBody → KeyPair kr → WitVKey 'Witness
- mkWitnessesVKey ∷ SafeHash EraIndependentTxBody → [KeyPair kr] → Set (WitVKey 'Witness)
- makeWitnessesFromScriptKeys ∷ SafeHash EraIndependentTxBody → Map (KeyHash kr) (KeyPair kr) → Set (KeyHash kr) → Set (WitVKey 'Witness)
- mkKeyHashWitFunPair ∷ ∀ kr. Gen (KeyHash kr, SafeHash EraIndependentTxBody → WitVKey 'Witness)
- mkVKeyRewardAccount ∷ Network → KeyPair 'Staking → RewardAccount
- mkKeyPair ∷ Int → KeyPair r
- mkKeyPairWithSeed ∷ ByteString → KeyPair r
- mkKeyHash ∷ Int → KeyHash kd
- data ByronKeyPair = ByronKeyPair {}
- mkBootKeyPairWithSeed ∷ ByteString → ByronKeyPair
- genByronVKeyAddr ∷ Gen (VerificationKey, Address)
- genByronAddrFromVKey ∷ VerificationKey → Gen Address
Documentation
mkScriptAddr ∷ ScriptHash → KeyPair 'Staking → Addr Source #
mkCred ∷ KeyPair kr → Credential kr Source #
data KeyPair (kd ∷ KeyRole) Source #
Instances
HasKeyRole KeyPair Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair | |
Arbitrary (KeyPair kd) Source # | |
Generic (KeyPair kd) Source # | |
Show (KeyPair kd) Source # | |
Typeable r ⇒ EncCBOR (KeyPair r) Source # | |
NFData (KeyPair kd) Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair | |
Typeable r ⇒ Eq (KeyPair r) Source # | |
NoThunks (KeyPair kd) Source # | |
Uniform (KeyPair kd) Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair uniformM ∷ StatefulGen g m ⇒ g → m (KeyPair kd) Source # | |
ToExpr (KeyPair r) Source # | |
type Rep (KeyPair kd) Source # | |
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
mkWitnessVKey ∷ SafeHash EraIndependentTxBody → KeyPair kr → WitVKey 'Witness Source #
Create a witness for transaction
mkWitnessesVKey ∷ SafeHash EraIndependentTxBody → [KeyPair kr] → Set (WitVKey 'Witness) Source #
Create witnesses for transaction
makeWitnessesFromScriptKeys ∷ 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. 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) ...
data ByronKeyPair Source #
Instances
Arbitrary ByronKeyPair Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair | |
Generic ByronKeyPair Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair from ∷ ByronKeyPair → Rep ByronKeyPair x Source # to ∷ Rep ByronKeyPair x → ByronKeyPair Source # | |
Show ByronKeyPair Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair | |
Uniform ByronKeyPair Source # | |
Defined in Test.Cardano.Ledger.Core.KeyPair 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.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))) |