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

feat: full refactor to align torus-utils-swift to torus.js #97

Merged
merged 19 commits into from
Jul 24, 2024

Conversation

metalurgical
Copy link
Collaborator

@metalurgical metalurgical commented May 13, 2024

This PR seeks to re-align the current implementation of torus-utils-swift to that of the web implementation of torus.js.

This will reduce the overhead of differences a developer would need to remember between the two and provide an overall better experience.

This will also provide better long term maintainability and make feature parity simpler to implement between the two.

The are also numerous bug fixes implemented in this PR as well, one of which allowed the package AnyCodable as a dependency to be removed.

This PR should be feature-complete up until tag v12.3.5 on torus.js (commit hash: 0160ae8fb4c622ba44c1e80872da2d17cb0e8650). Note: The import share implementation is a simplified implementation taken from the alpha branch of the same repo.

Note this is a breaking change and needs to be released as a major version.

For reviewers, it will be significantly easier to review this side-by-side with web rather than just trying to review the diff. Probably the best way to start would be to compare the test cases first.

@metalurgical
Copy link
Collaborator Author

Closes #94

@metalurgical
Copy link
Collaborator Author

metalurgical commented May 22, 2024

Resolve #95
Resolve #96
Close #95
Close #96

Re-align the current implementation of torus-utils-swift to that of the web implementation of torus.js.

This will reduce the overhead of differences a developer would need to remember between the two and provide an overall better experience.

This will also provide better long term maintainability and make feature parity simpler to implement between the two.

The are also numerous bug fixes implemented in this PR as well, one of which allowed the package AnyCodable as a dependency to be removed.

 Should be feature-complete up until tag v12.3.5 on torus.js
Package.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/Extensions/String+Extension.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/Helpers/MetadataUtils.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/Helpers/MetadataUtils.swift Outdated Show resolved Hide resolved
change legacyMetadataHost to metadataHost for getOrSetSapphireMetadataNonce() function.

add test for hexEncodedToString()
Sources/TorusUtils/Helpers/NodeUtils.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/Helpers/NodeUtils.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/Helpers/NodeUtils.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/Polynomial.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/TorusUtils.swift Show resolved Hide resolved
Sources/TorusUtils/TorusUtils.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/TorusUtils.swift Show resolved Hide resolved
Sources/TorusUtils/TorusUtils.swift Outdated Show resolved Hide resolved
Sources/TorusUtils/TorusUtils.swift Show resolved Hide resolved
fix: polyEval calculation
fix: missing not in comparison of TorusUtils.isLegacyNetworkRouteMap
fix: check on extendedVerifierId
fix: throw on invalid pubNonce
formatting
@himanshuchawla009 himanshuchawla009 merged commit 7788752 into master Jul 24, 2024
1 check passed
@himanshuchawla009 himanshuchawla009 deleted the feature_updates branch July 24, 2024 05:49
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.

2 participants