Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft the new, definite textEnvelopeType for Tx #630

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cardano-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for cardano-api

## 9.4.0.0 - UNRELEASED

- **BREAKING** Text envelope type of `Tx era` is now always using the new `Witnessed Tx` prefix.

## 9.3.0.0
- Upgrade `cardano-ledger-*`, `ouroboros-consensus-cardano`, `ouroboros-network-api`, `plutus-core` and `plutus-ledger-api`.
(feature, breaking)
Expand Down
15 changes: 8 additions & 7 deletions cardano-api/internal/Cardano/Api/Tx/Sign.hs
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,14 @@ getTxBody (ShelleyTx sbe tx) =

instance IsShelleyBasedEra era => HasTextEnvelope (Tx era) where
textEnvelopeType _ =
case shelleyBasedEra :: ShelleyBasedEra era of
ShelleyBasedEraShelley -> "TxSignedShelley"
ShelleyBasedEraAllegra -> "Tx AllegraEra"
ShelleyBasedEraMary -> "Tx MaryEra"
ShelleyBasedEraAlonzo -> "Tx AlonzoEra"
ShelleyBasedEraBabbage -> "Tx BabbageEra"
ShelleyBasedEraConway -> "Tx ConwayEra"
"Witnessed Tx" <>
case shelleyBasedEra :: ShelleyBasedEra era of
ShelleyBasedEraShelley -> "ShelleyEra"
ShelleyBasedEraAllegra -> "AllegraEra"
ShelleyBasedEraMary -> "MaryEra"
ShelleyBasedEraAlonzo -> "AlonzoEra"
ShelleyBasedEraBabbage -> "BabbageEra"
ShelleyBasedEraConway -> "ConwayEra"

-- ----------------------------------------------------------------------------
-- Transaction bodies
Expand Down
Loading