Skip to content

Conversation

@bogdan
Copy link
Contributor

@bogdan bogdan commented May 31, 2025

Current encoding/decoding mechanism is only useful when swift is storing data locally in JSON, no other platform would recognize encoding/decoding into an array of words with sign being the first element.

This patch allows a more standard decoding from HEX or DEC string only in decoding.
It leaves encoding intact due to backward compatibility.

Fixes #126.

@tgymnich
Copy link
Collaborator

tgymnich commented Jun 7, 2025

Thank you. This looks good. I guess we can get rid of the old encoder logic and make this a breaking change with a new major release. But for now we could keep this as a compatibility layer.

Maybe we can put the decoder behind a SwiftSetting: https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html#swiftsetting

@tgymnich tgymnich merged commit 519d466 into attaswift:master Jun 7, 2025
4 checks passed
@bogdan
Copy link
Contributor Author

bogdan commented Jul 9, 2025

@tgymnich can you please make a new release?

@tgymnich
Copy link
Collaborator

tgymnich commented Jul 9, 2025

@bogdan version 5.6 has been tagged and there is a pre release. Is something missing? Will change the pre release to a proper release soon.

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.

Ability to decode String into BigInt/BigUInt

2 participants