Skip to content

Commit

Permalink
Merge pull request #419 from IntersectMBO/smelc/add-drep-extended-key…
Browse files Browse the repository at this point in the history
…-signing-support

Support signing with drep extended key
  • Loading branch information
smelc authored Jan 8, 2024
2 parents 20c1d51 + 844a266 commit d439882
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
19 changes: 8 additions & 11 deletions cardano-api/internal/Cardano/Api/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,8 @@ data ShelleyWitnessSigningKey =
| WitnessGenesisUTxOKey (SigningKey GenesisUTxOKey)
| WitnessCommitteeColdKey (SigningKey CommitteeColdKey)
| WitnessCommitteeHotKey (SigningKey CommitteeHotKey)
| WitnessDRepKey (SigningKey DRepKey)
| WitnessDRepExtendedKey (SigningKey DRepExtendedKey)


makeShelleyKeyWitness :: forall era. ()
Expand Down Expand Up @@ -751,27 +753,22 @@ toShelleySigningKey key = case key of
WitnessStakePoolKey (StakePoolSigningKey sk) -> ShelleyNormalSigningKey sk
WitnessGenesisKey (GenesisSigningKey sk) -> ShelleyNormalSigningKey sk
WitnessGenesisUTxOKey (GenesisUTxOSigningKey sk) -> ShelleyNormalSigningKey sk
WitnessGenesisDelegateKey (GenesisDelegateSigningKey sk) ->
ShelleyNormalSigningKey sk
WitnessGenesisDelegateKey (GenesisDelegateSigningKey sk) -> ShelleyNormalSigningKey sk
WitnessCommitteeColdKey (CommitteeColdSigningKey sk) -> ShelleyNormalSigningKey sk
WitnessCommitteeHotKey (CommitteeHotSigningKey sk) -> ShelleyNormalSigningKey sk
WitnessDRepKey (DRepSigningKey sk) -> ShelleyNormalSigningKey sk

-- The cases for extended keys
WitnessPaymentExtendedKey (PaymentExtendedSigningKey sk) ->
ShelleyExtendedSigningKey sk

WitnessStakeExtendedKey (StakeExtendedSigningKey sk) ->
ShelleyExtendedSigningKey sk

WitnessGenesisExtendedKey (GenesisExtendedSigningKey sk) ->
ShelleyExtendedSigningKey sk

WitnessGenesisDelegateExtendedKey (GenesisDelegateExtendedSigningKey sk) ->
ShelleyExtendedSigningKey sk

WitnessCommitteeColdKey (CommitteeColdSigningKey sk) ->
ShelleyNormalSigningKey sk

WitnessCommitteeHotKey (CommitteeHotSigningKey sk) ->
ShelleyNormalSigningKey sk
WitnessDRepExtendedKey (DRepExtendedSigningKey sk) ->
ShelleyExtendedSigningKey sk


getShelleyKeyWitnessVerificationKey
Expand Down
1 change: 1 addition & 0 deletions cardano-api/src/Cardano/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ module Cardano.Api (
CommitteeMembersState (..),
-- ** DReps
DRepKey,
DRepExtendedKey,
DRepMetadata,
DRepMetadataReference,
DRepMetadataValidationError,
Expand Down

0 comments on commit d439882

Please sign in to comment.