Skip to content

Commit

Permalink
Add support for Bech32 serialisation of keys in Shelley address CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
intricate authored and newhoggy committed Mar 21, 2023
1 parent 53b5a97 commit 0476dcd
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Address.hs
@@ -1,3 +1,5 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}

Expand All @@ -7,7 +9,6 @@ module Cardano.CLI.Shelley.Run.Address
, buildShelleyAddress
, renderShelleyAddressCmdError
, runAddressCmd
, runAddressKeyGenToFile
, makeStakeAddressRef
) where

Expand Down Expand Up @@ -193,13 +194,14 @@ buildShelleyAddress vkey mbStakeVerifier nw =
foldSomeAddressVerificationKey :: (forall keyrole. Key keyrole =>
VerificationKey keyrole -> a)
-> SomeAddressVerificationKey -> a
foldSomeAddressVerificationKey f (AByronVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (APaymentVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (APaymentExtendedVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AGenesisUTxOVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AKesVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AGenesisDelegateExtendedVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AGenesisExtendedVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AVrfVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AStakeVerificationKey vk) = f vk
foldSomeAddressVerificationKey f (AStakeExtendedVerificationKey vk) = f vk
foldSomeAddressVerificationKey f = \case
AByronVerificationKey vk -> f vk
APaymentVerificationKey vk -> f vk
APaymentExtendedVerificationKey vk -> f vk
AGenesisUTxOVerificationKey vk -> f vk
AKesVerificationKey vk -> f vk
AGenesisDelegateExtendedVerificationKey vk -> f vk
AGenesisExtendedVerificationKey vk -> f vk
AVrfVerificationKey vk -> f vk
AStakeVerificationKey vk -> f vk
AStakeExtendedVerificationKey vk -> f vk

0 comments on commit 0476dcd

Please sign in to comment.