Export fromLedgerTxValidityLowerBound and fromLedgerTxValidityUpperBound#1118
Export fromLedgerTxValidityLowerBound and fromLedgerTxValidityUpperBound#1118
Conversation
These functions already exist internally in Cardano.Api.Tx.Internal.Body but were not exported. Export them from both the Internal module and the Cardano.Api.Tx re-export module, following the same pattern as fromLedgerTxOuts.
There was a problem hiding this comment.
Pull request overview
Exports two existing internal helpers that convert ledger validity interval bounds so downstream users can access them via the public Cardano.Api.Tx module.
Changes:
- Export
fromLedgerTxValidityLowerBoundandfromLedgerTxValidityUpperBoundfromCardano.Api.Tx.Internal.Body - Re-export the same functions from
Cardano.Api.Tx - Document the change in
cardano-api’s changelog
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cardano-api/src/Cardano/Api/Tx/Internal/Body.hs | Adds the two validity-bound helpers to the module export list |
| cardano-api/src/Cardano/Api/Tx.hs | Re-exports the two helpers from the public Tx module |
| cardano-api/CHANGELOG.md | Notes the new exports as a compatible change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cardano-api/CHANGELOG.md
Outdated
| - Export `fromLedgerTxValidityLowerBound` and `fromLedgerTxValidityUpperBound` from | ||
| `Cardano.Api.Tx.Internal.Body` |
There was a problem hiding this comment.
Since the PR summary says these functions are exported from Cardano.Api.Tx.Internal.Body and re-exported from Cardano.Api.Tx, the changelog entry should mention the public re-export as that’s what downstream consumers will most likely use. Consider updating the entry to explicitly say they’re now available from Cardano.Api.Tx (and/or both modules).
| - Export `fromLedgerTxValidityLowerBound` and `fromLedgerTxValidityUpperBound` from | |
| `Cardano.Api.Tx.Internal.Body` | |
| - Make `fromLedgerTxValidityLowerBound` and `fromLedgerTxValidityUpperBound` available from | |
| `Cardano.Api.Tx` (re-exported from `Cardano.Api.Tx.Internal.Body`) |
Changelog
Context
Originally requested in PR #892 by @locallycompact. @carbolymer pointed out that these functions already exist internally and just need to be exported. This PR does that, following the same export pattern as
fromLedgerTxOuts.How to trust this PR
No new code — just adds two existing internal functions to the export lists of
Cardano.Api.Tx.Internal.BodyandCardano.Api.Tx.Checklist