{-# LANGUAGE DataKinds #-}
module Test.Cardano.Ledger.Mary.Examples.Cast (
alicePay,
aliceStake,
aliceAddr,
bobPay,
bobStake,
bobAddr,
carlPay,
carlStake,
carlAddr,
dariaPay,
dariaStake,
dariaAddr,
) where
import Cardano.Ledger.Address (Addr (..))
import Cardano.Ledger.Crypto (StandardCrypto)
import Cardano.Ledger.Keys (
KeyRole (..),
)
import Test.Cardano.Ledger.Core.KeyPair (KeyPair (..), mkAddr)
import Test.Cardano.Ledger.Shelley.Utils (RawSeed (..), mkKeyPair)
alicePay :: KeyPair 'Payment StandardCrypto
alicePay :: KeyPair 'Payment StandardCrypto
alicePay = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
0 Word64
0 Word64
0 Word64
0 Word64
0)
aliceStake :: KeyPair 'Staking StandardCrypto
aliceStake :: KeyPair 'Staking StandardCrypto
aliceStake = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
1 Word64
1 Word64
1 Word64
1 Word64
1)
aliceAddr :: Addr StandardCrypto
aliceAddr :: Addr StandardCrypto
aliceAddr = forall c.
Crypto c =>
(KeyPair 'Payment c, KeyPair 'Staking c) -> Addr c
mkAddr (KeyPair 'Payment StandardCrypto
alicePay, KeyPair 'Staking StandardCrypto
aliceStake)
bobPay :: KeyPair 'Payment StandardCrypto
bobPay :: KeyPair 'Payment StandardCrypto
bobPay = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
2 Word64
2 Word64
2 Word64
2 Word64
2)
bobStake :: KeyPair 'Staking StandardCrypto
bobStake :: KeyPair 'Staking StandardCrypto
bobStake = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
3 Word64
3 Word64
3 Word64
3 Word64
3)
bobAddr :: Addr StandardCrypto
bobAddr :: Addr StandardCrypto
bobAddr = forall c.
Crypto c =>
(KeyPair 'Payment c, KeyPair 'Staking c) -> Addr c
mkAddr (KeyPair 'Payment StandardCrypto
bobPay, KeyPair 'Staking StandardCrypto
bobStake)
carlPay :: KeyPair 'Payment StandardCrypto
carlPay :: KeyPair 'Payment StandardCrypto
carlPay = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
4 Word64
4 Word64
4 Word64
4 Word64
4)
carlStake :: KeyPair 'Staking StandardCrypto
carlStake :: KeyPair 'Staking StandardCrypto
carlStake = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
5 Word64
5 Word64
5 Word64
5 Word64
5)
carlAddr :: Addr StandardCrypto
carlAddr :: Addr StandardCrypto
carlAddr = forall c.
Crypto c =>
(KeyPair 'Payment c, KeyPair 'Staking c) -> Addr c
mkAddr (KeyPair 'Payment StandardCrypto
carlPay, KeyPair 'Staking StandardCrypto
carlStake)
dariaPay :: KeyPair 'Payment StandardCrypto
dariaPay :: KeyPair 'Payment StandardCrypto
dariaPay = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
6 Word64
6 Word64
6 Word64
6 Word64
6)
dariaStake :: KeyPair 'Staking StandardCrypto
dariaStake :: KeyPair 'Staking StandardCrypto
dariaStake = forall (kd :: KeyRole) c.
VKey kd c -> SignKeyDSIGN (DSIGN c) -> KeyPair kd c
KeyPair forall {kd :: KeyRole}. VKey kd StandardCrypto
vk SignKeyDSIGN (DSIGN StandardCrypto)
sk
where
(SignKeyDSIGN (DSIGN StandardCrypto)
sk, VKey kd StandardCrypto
vk) = forall c (kd :: KeyRole).
DSIGNAlgorithm (DSIGN c) =>
RawSeed -> (SignKeyDSIGN (DSIGN c), VKey kd c)
mkKeyPair (Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> RawSeed
RawSeed Word64
7 Word64
7 Word64
7 Word64
7 Word64
7)
dariaAddr :: Addr StandardCrypto
dariaAddr :: Addr StandardCrypto
dariaAddr = forall c.
Crypto c =>
(KeyPair 'Payment c, KeyPair 'Staking c) -> Addr c
mkAddr (KeyPair 'Payment StandardCrypto
dariaPay, KeyPair 'Staking StandardCrypto
dariaStake)