Skip to content

ref: Refactor Routing to Immutable Results and Complete Spec Compliance#211

Merged
codeZe-us merged 1 commit intomainfrom
cleanup
Apr 1, 2026
Merged

ref: Refactor Routing to Immutable Results and Complete Spec Compliance#211
codeZe-us merged 1 commit intomainfrom
cleanup

Conversation

@codeZe-us
Copy link
Copy Markdown
Contributor

@codeZe-us codeZe-us commented Apr 1, 2026

I refactored the core routing logic to utilize a fully immutable RoutingResult data structure and consolidated all associated routing types—including RoutingSource, RoutingWarning, and RoutingInput into a single, high-cohesion library file. The internal architectural cleanup included the addition of readable display string generation for both routing sources and results, providing clear diagnostic summaries for payment destinations. To ensure strict adherence to the project specifications, I implemented a prefix-based guard that throws a dedicated ExtractRoutingException for invalid destination types like contract addresses, matching the behavior of the reference SDK implementations. Also, enabled the automated spec runner for the routing module by adding legacy address normalization, which allowed the library to achieve 100% pass rates across all 74 unit tests and normative vectors. All 64-bit identifiers are now strictly handled as BigInt to guarantee precision on web platforms, and redundant legacy files have been removed to finalize the implementation of the routing layer.

@codeZe-us codeZe-us merged commit 8827d79 into main Apr 1, 2026
1 check failed
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.

1 participant