Nov 02, 12-1 PM (17)
Nov 02, 1-2 PM (6)
Nov 02, 2-3 PM (7)
Nov 02, 3-4 PM (7)
Nov 02, 4-5 PM (5)
Nov 02, 5-6 PM (11)
Nov 02, 6-7 PM (3)
Nov 02, 7-8 PM (4)
Nov 02, 8-9 PM (17)
Nov 02, 9-10 PM (8)
Nov 02, 10-11 PM (35)
Nov 02, 11-12 AM (69)
Nov 03, 12-1 AM (9)
Nov 03, 1-2 AM (26)
Nov 03, 2-3 AM (13)
Nov 03, 3-4 AM (11)
Nov 03, 4-5 AM (14)
Nov 03, 5-6 AM (1)
Nov 03, 6-7 AM (7)
Nov 03, 7-8 AM (28)
Nov 03, 8-9 AM (29)
Nov 03, 9-10 AM (14)
Nov 03, 10-11 AM (42)
Nov 03, 11-12 PM (14)
Nov 03, 12-1 PM (56)
Nov 03, 1-2 PM (125)
Nov 03, 2-3 PM (41)
Nov 03, 3-4 PM (53)
Nov 03, 4-5 PM (19)
Nov 03, 5-6 PM (72)
Nov 03, 6-7 PM (11)
Nov 03, 7-8 PM (12)
Nov 03, 8-9 PM (15)
Nov 03, 9-10 PM (25)
Nov 03, 10-11 PM (26)
Nov 03, 11-12 AM (24)
Nov 04, 12-1 AM (18)
Nov 04, 1-2 AM (13)
Nov 04, 2-3 AM (23)
Nov 04, 3-4 AM (17)
Nov 04, 4-5 AM (8)
Nov 04, 5-6 AM (6)
Nov 04, 6-7 AM (17)
Nov 04, 7-8 AM (50)
Nov 04, 8-9 AM (32)
Nov 04, 9-10 AM (23)
Nov 04, 10-11 AM (33)
Nov 04, 11-12 PM (23)
Nov 04, 12-1 PM (32)
Nov 04, 1-2 PM (67)
Nov 04, 2-3 PM (75)
Nov 04, 3-4 PM (47)
Nov 04, 4-5 PM (16)
Nov 04, 5-6 PM (19)
Nov 04, 6-7 PM (9)
Nov 04, 7-8 PM (17)
Nov 04, 8-9 PM (12)
Nov 04, 9-10 PM (12)
Nov 04, 10-11 PM (31)
Nov 04, 11-12 AM (25)
Nov 05, 12-1 AM (7)
Nov 05, 1-2 AM (6)
Nov 05, 2-3 AM (13)
Nov 05, 3-4 AM (11)
Nov 05, 4-5 AM (5)
Nov 05, 5-6 AM (9)
Nov 05, 6-7 AM (62)
Nov 05, 7-8 AM (36)
Nov 05, 8-9 AM (46)
Nov 05, 9-10 AM (53)
Nov 05, 10-11 AM (103)
Nov 05, 11-12 PM (49)
Nov 05, 12-1 PM (45)
Nov 05, 1-2 PM (44)
Nov 05, 2-3 PM (34)
Nov 05, 3-4 PM (40)
Nov 05, 4-5 PM (19)
Nov 05, 5-6 PM (23)
Nov 05, 6-7 PM (22)
Nov 05, 7-8 PM (19)
Nov 05, 8-9 PM (18)
Nov 05, 9-10 PM (10)
Nov 05, 10-11 PM (36)
Nov 05, 11-12 AM (14)
Nov 06, 12-1 AM (5)
Nov 06, 1-2 AM (8)
Nov 06, 2-3 AM (24)
Nov 06, 3-4 AM (10)
Nov 06, 4-5 AM (2)
Nov 06, 5-6 AM (10)
Nov 06, 6-7 AM (26)
Nov 06, 7-8 AM (20)
Nov 06, 8-9 AM (47)
Nov 06, 9-10 AM (49)
Nov 06, 10-11 AM (44)
Nov 06, 11-12 PM (66)
Nov 06, 12-1 PM (37)
Nov 06, 1-2 PM (100)
Nov 06, 2-3 PM (59)
Nov 06, 3-4 PM (75)
Nov 06, 4-5 PM (39)
Nov 06, 5-6 PM (25)
Nov 06, 6-7 PM (51)
Nov 06, 7-8 PM (19)
Nov 06, 8-9 PM (11)
Nov 06, 9-10 PM (10)
Nov 06, 10-11 PM (33)
Nov 06, 11-12 AM (19)
Nov 07, 12-1 AM (0)
Nov 07, 1-2 AM (2)
Nov 07, 2-3 AM (10)
Nov 07, 3-4 AM (20)
Nov 07, 4-5 AM (8)
Nov 07, 5-6 AM (4)
Nov 07, 6-7 AM (12)
Nov 07, 7-8 AM (11)
Nov 07, 8-9 AM (45)
Nov 07, 9-10 AM (83)
Nov 07, 10-11 AM (43)
Nov 07, 11-12 PM (40)
Nov 07, 12-1 PM (44)
Nov 07, 1-2 PM (104)
Nov 07, 2-3 PM (43)
Nov 07, 3-4 PM (32)
Nov 07, 4-5 PM (41)
Nov 07, 5-6 PM (21)
Nov 07, 6-7 PM (11)
Nov 07, 7-8 PM (7)
Nov 07, 8-9 PM (14)
Nov 07, 9-10 PM (6)
Nov 07, 10-11 PM (30)
Nov 07, 11-12 AM (22)
Nov 08, 12-1 AM (4)
Nov 08, 1-2 AM (2)
Nov 08, 2-3 AM (5)
Nov 08, 3-4 AM (2)
Nov 08, 4-5 AM (1)
Nov 08, 5-6 AM (0)
Nov 08, 6-7 AM (0)
Nov 08, 7-8 AM (3)
Nov 08, 8-9 AM (2)
Nov 08, 9-10 AM (1)
Nov 08, 10-11 AM (1)
Nov 08, 11-12 PM (4)
Nov 08, 12-1 PM (6)
Nov 08, 1-2 PM (7)
Nov 08, 2-3 PM (5)
Nov 08, 3-4 PM (2)
Nov 08, 4-5 PM (9)
Nov 08, 5-6 PM (20)
Nov 08, 6-7 PM (3)
Nov 08, 7-8 PM (10)
Nov 08, 8-9 PM (3)
Nov 08, 9-10 PM (1)
Nov 08, 10-11 PM (32)
Nov 08, 11-12 AM (27)
Nov 09, 12-1 AM (8)
Nov 09, 1-2 AM (4)
Nov 09, 2-3 AM (4)
Nov 09, 3-4 AM (3)
Nov 09, 4-5 AM (2)
Nov 09, 5-6 AM (0)
Nov 09, 6-7 AM (6)
Nov 09, 7-8 AM (14)
Nov 09, 8-9 AM (5)
Nov 09, 9-10 AM (2)
Nov 09, 10-11 AM (2)
Nov 09, 11-12 PM (1)
Nov 09, 12-1 PM (0)
3,868 commits this week Nov 02, 2025 - Nov 09, 2025
refactor(api): export caseBabbageOnlyOrConwayEraOnwards from public API
Completes the integration of caseBabbageOnlyOrConwayEraOnwards by adding it
to the public API exports, ensuring it's available alongside other era case
functions like caseByronOrShelleyBasedEra.

- Add caseBabbageOnlyOrConwayEraOnwards to Cardano.Api.Era export list
- Create new "Case on BabbageEraOnwards" subsection for organization
- Add corresponding export section in Internal.Case module
- Implement the function to handle Babbage-only vs Conway+ era branching

The function enables cleaner conditional logic when dealing with features
that differ between Babbage and Conway eras, particularly useful for
handling Conway-specific governance features and protocol parameters.
test(api): add comprehensive JSON tests for TxOut instances
Implements extensive test coverage for the ToJSON and FromJSON instances
of TxOut across all eras and contexts, ensuring robust JSON serialization
and deserialization behavior.

Test modules added:
- Test.Cardano.Api.TxOut.Gen: Specialized generators for TxOut with specific
  datum types (no datum, datum hash, supplemental, inline) and invalid JSON
  scenarios for error testing
- Test.Cardano.Api.TxOut.Helpers: Test utilities including JSON field
  assertions, parse failure validators, and datum equality checks
- Test.Cardano.Api.TxOut.Json: Main test module organizing all test suites
- Test.Cardano.Api.TxOut.JsonRoundtrip: Roundtrip property tests for all
  eras (Shelley through Conway) in both CtxTx and CtxUTxO contexts
- Test.Cardano.Api.TxOut.JsonEdgeCases: Edge case tests for supplemental
  datum behavior, null field handling, and ToJSON output validation
- Test.Cardano.Api.TxOut.JsonErrorCases: Error case tests for conflicting
  datums, mismatched hashes, partial fields, and invalid data

Coverage highlights:
- All eras from Byron through Dijkstra (where supported)
- Both transaction contexts (CtxTx and CtxUTxO)
- All datum types including edge cases like supplemental datums
- Comprehensive error handling validation
- JSON field presence and null handling verification

This test suite ensures the TxOut JSON instances maintain backward
compatibility while properly handling the complex datum type variations
across different Cardano eras.
refactor(internal): improve clarity of Alonzo TxOut parser implementation
Refactors the alonzoTxOutParser function to enhance code readability and
maintainability by introducing clearer variable names and improving the
logical flow of datum field parsing.

Key improvements:
- Rename ambiguous variables (mDatumVal -> mDatumJson, dVal -> datumJson)
  to clearly indicate they contain JSON representations of datum values
- Add descriptive comments explaining each datum parsing case:
  * No datum information (Nothing, Nothing)
  * Datum hash only (Nothing, Just hash)
  * Both hash and JSON for supplemental datum (Just json, Just hash)
  * Invalid state with JSON but no hash (Just json, Nothing)
- Extract datum parsing into a dedicated section, separating it from
  reference script handling for better code organization
- Use more descriptive variable names (parsedAddress, parsedValue) to
  distinguish parsed results from raw JSON fields
docs: document remaining duplication in CtxUTxO FromJSON instance
Adds inline documentation noting that the CtxUTxO instance still contains
~60 lines of duplicated code in the Babbage/Conway/Dijkstra cases that
could potentially be refactored using a similar approach to the CtxTx
instance refactoring.

The comment includes:
- NOTE: Identifies the specific lines containing duplication
- POTENTIAL REFACTORING: Suggests how it could be addressed (similar to
  parseInlineDatum helper in CtxTx)
- BLOCKER: Documents the key difference that must be preserved - CtxUTxO's
  alonzoTxOutParser doesn't handle supplemental datums, unlike CtxTx

This serves as documentation for future maintainers who may want to
complete the refactoring, while explaining why it wasn't done in this PR.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
docs: add comprehensive inline documentation for TxOut JSON parsing refactoring
This commit adds detailed inline documentation to explain the design decisions,
assumptions, and potential issues in the refactored TxOut JSON parsing code.

Key documentation areas:

1. parseBabbageOnwardsTxOut:
   - MOTIVATION: Explains this eliminates ~100 lines of duplication
   - DESIGN: Documents the two-phase parsing strategy (Alonzo + Babbage reconciliation)
   - ASSUMPTION: Notes BabbageEraOnwards covers exactly three eras

2. parseInlineDatum:
   - CRITICAL DISTINCTION: Explains why Babbage uses scriptDataJsonToHashable
     vs Conway+ using scriptDataFromJson (CBOR encoding preservation requirement)
   - VALIDATION: Documents hash verification logic
   - POTENTIAL ISSUE: Warns about wildcard pattern assumption

3. reconcileDatums:
   - BACKWARDS COMPATIBILITY: Lists the three valid JSON formats accepted
   - ERROR HANDLING: Explains conflicting datum detection and error messages
   - EXHAUSTIVENESS: Documents how direct GADT matching enables compiler verification
     when new eras are added to BabbageEraOnwards

4. eraName helper:
   - Documents switch from ShelleyBasedEra to direct BabbageEraOnwards matching
   - Explains benefit: compiler enforces exhaustiveness, preventing incomplete updates
refactor(api): extract Babbage/Conway/Dijkstra parsing into unified helper
Creates parseBabbageOnwardsTxOut helper function to eliminate the final
source of duplication in the FromJSON instance. The three era cases
(Babbage, Conway, Dijkstra) now each call this single helper function.

This completes the refactoring by:
- Reducing the FromJSON instance by ~10 more lines
- Making the code structure clearer with simple era-based dispatch
- Consolidating all Babbage+ era parsing logic in one place
- Maintaining full backwards compatibility with all tests passing

The main case expression now clearly shows the parsing strategy for
each era, with complex logic extracted into well-named helper functions.
refactor(api): unify reconcileBabbage and reconcileConway functions
Replaces two nearly-identical datum reconciliation functions with a
single reconcileDatums function that works for all Babbage+ eras,
eliminating ~40 lines of duplicated code.

The unified function:
- Works with BabbageEraOnwards constraint (covering Babbage, Conway, Dijkstra)
- Uses era witness to construct appropriate ReferenceScript types
- Generates era-specific error messages dynamically
- Handles conflicting Alonzo-style and Babbage-style datums

All tests pass, confirming behavioral equivalence and backwards
compatibility.
refactor(api): extract inline datum parsing into helper function
Eliminates ~50 lines of code duplication by extracting the repeated
inline datum parsing logic from Babbage/Conway/Dijkstra cases into a
single parseInlineDatum helper function.

The refactored helper:
- Parses both inlineDatumhash and inlineDatum fields
- Validates that the datum matches its hash
- Handles era-specific parsing differences between Babbage
  (scriptDataJsonToHashable) and Conway/Dijkstra (scriptDataFromJson)
- Maintains identical behavior with all existing tests passing

This consolidation improves maintainability by ensuring consistent
error handling and validation across all Babbage+ eras.
refactor(api): extract Babbage/Conway/Dijkstra parsing into unified helper
Creates parseBabbageOnwardsTxOut helper function to eliminate the final
source of duplication in the FromJSON instance. The three era cases
(Babbage, Conway, Dijkstra) now each call this single helper function.

This completes the refactoring by:
- Reducing the FromJSON instance by ~10 more lines
- Making the code structure clearer with simple era-based dispatch
- Consolidating all Babbage+ era parsing logic in one place
- Maintaining full backwards compatibility with all tests passing

The main case expression now clearly shows the parsing strategy for
each era, with complex logic extracted into well-named helper functions.