We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CastVerificationKeyRole StakePoolExtendedKey StakePoolKey
1 parent b317be5 commit 037327eCopy full SHA for 037327e
cardano-api/src/Cardano/Api/Internal/Keys/Shelley.hs
@@ -1906,6 +1906,18 @@ instance SerialiseAsBech32 (SigningKey StakePoolExtendedKey) where
1906
bech32PrefixFor _ = "pool_xsk"
1907
bech32PrefixesPermitted _ = ["pool_xsk"]
1908
1909
+instance CastVerificationKeyRole StakePoolExtendedKey StakePoolKey where
1910
+ castVerificationKey (StakePoolExtendedVerificationKey vk) =
1911
+ StakePoolVerificationKey
1912
+ . Shelley.VKey
1913
+ . fromMaybe impossible
1914
+ . Crypto.rawDeserialiseVerKeyDSIGN
1915
+ . Crypto.HD.xpubPublicKey
1916
+ $ vk
1917
+ where
1918
+ impossible =
1919
+ error "castVerificationKey (StakePoolKey): byron and shelley key sizes do not match!"
1920
+
1921
--
1922
-- DRep keys
1923
0 commit comments