Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mkAddr ∷ Crypto c ⇒ (KeyPair 'Payment c, KeyPair 'Staking c) → Addr c
- mkScriptAddr ∷ Crypto c ⇒ ScriptHash c → KeyPair 'Staking c → Addr c
- mkCred ∷ Crypto c ⇒ KeyPair kr c → Credential kr c
- data KeyPair (kd ∷ KeyRole) c = KeyPair {
- vKey ∷ !(VKey kd c)
- sKey ∷ !(SignKeyDSIGN (DSIGN c))
- type KeyPairs c = [(KeyPair 'Payment c, KeyPair 'Staking c)]
- mkWitnessVKey ∷ ∀ c kr. (Crypto c, DSignable c (Hash (HASH c) EraIndependentTxBody)) ⇒ SafeHash c EraIndependentTxBody → KeyPair kr c → WitVKey 'Witness c
- mkWitnessesVKey ∷ ∀ c kr. (Crypto c, DSignable c (Hash (HASH c) EraIndependentTxBody)) ⇒ SafeHash c EraIndependentTxBody → [KeyPair kr c] → Set (WitVKey 'Witness c)
- makeWitnessesFromScriptKeys ∷ (Crypto c, DSignable c (Hash c EraIndependentTxBody)) ⇒ SafeHash c EraIndependentTxBody → Map (KeyHash kr c) (KeyPair kr c) → Set (KeyHash kr c) → Set (WitVKey 'Witness c)
- mkKeyHashWitFunPair ∷ ∀ kr. Gen (KeyHash kr StandardCrypto, SafeHash StandardCrypto EraIndependentTxBody → WitVKey 'Witness StandardCrypto)
- mkVKeyRewardAccount ∷ Crypto c ⇒ Network → KeyPair 'Staking c → RewardAccount c
- mkKeyPair ∷ Crypto c ⇒ Int → KeyPair r c
- mkKeyPairWithSeed ∷ ∀ r c. Crypto c ⇒ ByteString → KeyPair r c
- mkKeyHash ∷ Crypto c ⇒ Int → KeyHash kd c
- data ByronKeyPair = ByronKeyPair {}
- mkBootKeyPairWithSeed ∷ ByteString → ByronKeyPair
- genByronVKeyAddr ∷ Gen (VerificationKey, Address)
- genByronAddrFromVKey ∷ VerificationKey → Gen Address
Documentation
mkScriptAddr ∷ Crypto c ⇒ ScriptHash c → KeyPair 'Staking c → Addr c Source #
data KeyPair (kd ∷ KeyRole) c Source #
Instances
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 EraIndependentTxBody → KeyPair 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 EraIndependentTxBody → Map (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 EraIndependentTxBody → WitVKey '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) ...
mkVKeyRewardAccount ∷ Crypto c ⇒ Network → KeyPair 'Staking c → RewardAccount c Source #
mkKeyPairWithSeed ∷ ∀ r c. Crypto c ⇒ ByteString → KeyPair r c Source #
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.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))) |