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

[1.1.0] (JSON only) Serialization of TxKernel u64s as strings #2698

Merged
merged 1 commit into from
Mar 21, 2019

Conversation

yeastplume
Copy link
Member

As part of wallet V2 API, I'm ensuring that all u64 fields returned by the API are serialized into JSON as strings as opposed to literals, as it's not guaranteed that consumers will know what to do with a u64 literal (javascript, for instance). TxKernel is embedded in the JSON slate, so the custom serializer needs to be added to it.

Note that the API will still be able to accept literals in u64 fields on deserialization, it will just produce them as strings by default on serialization.

@yeastplume yeastplume merged commit 6949a0d into mimblewimble:milestone/1.1.0 Mar 21, 2019
@DavidBurkett
Copy link
Contributor

Why not just require it to always be a string? Since this is a 'V2' API, there's no requirement of backward compatibility.

@yeastplume
Copy link
Member Author

It's just as easy to accept both and might remove an annoyance for clients that can deal with u64 literals

@yeastplume yeastplume deleted the tx_kernel_ser branch May 20, 2019 08:19
@antiochp antiochp added this to the 1.1.0 milestone Jun 5, 2019
@antiochp antiochp added the release notes To be included in release notes (of relevant milestone). label Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes To be included in release notes (of relevant milestone).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants