Skip to content

Add ADR-016: cardano-api new TxBodyContent#84

Merged
Jimbo4350 merged 1 commit intomainfrom
jordan/adr-016-new-txbodycontent
Feb 25, 2026
Merged

Add ADR-016: cardano-api new TxBodyContent#84
Jimbo4350 merged 1 commit intomainfrom
jordan/adr-016-new-txbodycontent

Conversation

@Jimbo4350
Copy link
Contributor

Summary

  • Adds ADR-016 documenting the decision to replace the legacy TxBodyContent build era type with a simplified TxBodyContent era that uses ledger types directly
  • Updates the ADR index in Architecture-Decision-Records.md with the new entry

Test plan

  • Verify markdown link checker passes
  • Review ADR content for completeness and accuracy

Document the architectural decision to replace the legacy
TxBodyContent build era type with a simplified TxBodyContent era
that uses ledger types directly, eliminates the build phantom
parameter, and integrates with the ADR-010 witness API.
Copilot AI review requested due to automatic review settings February 25, 2026 19:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Architecture Decision Record (ADR-016) describing a simplified TxBodyContent era transaction-construction type for cardano-api’s experimental API, and updates the ADR index to reference it.

Changes:

  • Add docs/ADR-016-cardano-api-new-txbodycontent.md documenting the new TxBodyContent approach and related types/patterns.
  • Update docs/Architecture-Decision-Records.md to include an entry for ADR-16.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/Architecture-Decision-Records.md Adds an index entry linking to the new ADR.
docs/ADR-016-cardano-api-new-txbodycontent.md Introduces ADR-016 describing the new transaction body content design and related API elements.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,184 @@
# Status

-[ ] Proposed 2026-02-23
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown task list item under Status is missing a space after the dash (-[ ]), so it won’t render as a checkbox. Use - [ ] Proposed 2026-02-23 (or match the emoji-based Status style used in other ADRs) so the Status section renders correctly.

Suggested change
-[ ] Proposed 2026-02-23
- [ ] Proposed 2026-02-23

Copilot uses AI. Check for mistakes.
= L.EraTx era => UnsignedTx (Ledger.Tx era)
```

The output of `makeUnsignedTx` is a ledger transaction that lacks only key witnesses. The `EraTx` constraint is carried existentially in the constructor. A `ToApiEra` type family maps ledger eras back to cardano-api eras for serialization infrastructure compatibility.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UnsignedTx definition and the explanation below it don’t match: data UnsignedTx era = L.EraTx era => UnsignedTx (Ledger.Tx era) is not an existentially-quantified era (the era type parameter remains visible), yet the text says the EraTx constraint is carried existentially. Either update the type to actually hide the era (true existential) or adjust the wording/snippet to reflect a non-existential, era-indexed wrapper.

Suggested change
The output of `makeUnsignedTx` is a ledger transaction that lacks only key witnesses. The `EraTx` constraint is carried existentially in the constructor. A `ToApiEra` type family maps ledger eras back to cardano-api eras for serialization infrastructure compatibility.
The output of `makeUnsignedTx` is a ledger transaction that lacks only key witnesses, wrapped in an era-indexed `UnsignedTx era`. The `EraTx` constraint is attached to the constructor (as a constructor context) rather than hiding the era existentially. A `ToApiEra` type family maps ledger eras back to cardano-api eras for serialization infrastructure compatibility.

Copilot uses AI. Check for mistakes.
* 📜 [[ADR-6 Using optparse-applicative main repository]]
* 📜 [[ADR-7 CLI Output Presentation]]
* 📜 [[ADR-16 cardano-api new TxBodyContent]]

Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ADR index currently jumps from ADR-7 to ADR-16, but the docs folder contains ADR-008 through ADR-015. This makes the index misleading/incomplete for navigation; consider adding the missing ADR entries (8–15) or otherwise clarifying that this list is intentionally partial.

Suggested change
Note: ADR-8 through ADR-15 are present in the ADR documents but are not yet indexed here.

Copilot uses AI. Check for mistakes.
@Jimbo4350 Jimbo4350 merged commit 067c3fe into main Feb 25, 2026
4 of 5 checks passed
@Jimbo4350 Jimbo4350 deleted the jordan/adr-016-new-txbodycontent branch February 25, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants