Skip to content

Commit b468c43

Browse files
committed
Add test for creating registration certificate using extended cold key
1 parent eb18eae commit b468c43

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

cardano-cli/test/cardano-cli-golden/Test/Golden/Shelley/StakePool/RegistrationCertificate.hs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,42 @@ hprop_golden_shelley_stake_pool_registration_certificate = propertyOnce . H.modu
5050
goldenFile <- H.note "test/cardano-cli-golden/files/golden/shelley/reg-certificate.json"
5151

5252
H.diffFileVsGoldenFile registrationCertFile goldenFile
53+
54+
hprop_golden_conway_stake_pool_registration_certificate_extended_cold_key :: Property
55+
hprop_golden_conway_stake_pool_registration_certificate_extended_cold_key = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
56+
operatorVerificationKeyFile <-
57+
noteInputFile "test/cardano-cli-golden/files/input/shelley/node-pool/extended-operator.vkey"
58+
vrfVerificationKeyFile <-
59+
noteInputFile "test/cardano-cli-golden/files/input/shelley/node-pool/vrf.vkey"
60+
ownerVerificationKeyFile <-
61+
noteInputFile "test/cardano-cli-golden/files/input/shelley/node-pool/owner.vkey"
62+
registrationCertFile <- noteTempFile tempDir "registration.cert"
63+
64+
void $
65+
execCardanoCLI
66+
[ "conway"
67+
, "stake-pool"
68+
, "registration-certificate"
69+
, "--testnet-magic"
70+
, "42"
71+
, "--pool-pledge"
72+
, "0"
73+
, "--pool-cost"
74+
, "0"
75+
, "--pool-margin"
76+
, "0"
77+
, "--cold-verification-key-file"
78+
, operatorVerificationKeyFile
79+
, "--vrf-verification-key-file"
80+
, vrfVerificationKeyFile
81+
, "--pool-reward-account-verification-key-file"
82+
, ownerVerificationKeyFile
83+
, "--pool-owner-stake-verification-key-file"
84+
, ownerVerificationKeyFile
85+
, "--out-file"
86+
, registrationCertFile
87+
]
88+
89+
goldenFile <- H.note "test/cardano-cli-golden/files/golden/shelley/reg-certificate-extended.json"
90+
91+
H.diffFileVsGoldenFile registrationCertFile goldenFile
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "CertificateConway",
3+
"description": "Stake Pool Registration Certificate",
4+
"cborHex": "8a03581c1ae194ffedb008b77bfb8ec39b1514dbeb99ceccd66448181295142258206aa5f600f54659d456dc2628997df23d98f8f85681edd3e6f4a9340cb06b8db70000d81e820001581de0749440f878a5ba2ac3ab03dbdec6ae3ad5c89f06fc9c031611947803d9010281581c749440f878a5ba2ac3ab03dbdec6ae3ad5c89f06fc9c03161194780380f6"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "StakePoolExtendedVerificationKey_ed25519_bip32",
3+
"description": "Stake Pool Operator Verification Key",
4+
"cborHex": "58405474de0dd906dae02e33cad45bb24a21f1ade6af57457b6ea171985412cd35d070a3adf6f2ecd799fa127e536d2c93c2c1946d11fb92c5608dfb3acef8eb72f1"
5+
}

0 commit comments

Comments
 (0)