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

extend ChangeHash internal initializer to use Automerge core logic #193

Open
heckj opened this issue Jul 13, 2024 · 0 comments
Open

extend ChangeHash internal initializer to use Automerge core logic #193

heckj opened this issue Jul 13, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@heckj
Copy link
Collaborator

heckj commented Jul 13, 2024

From #191 :

In the automerge crate we have a TryFrom<&[u8]> implementation for ChangeHash. This is the supported way of converting bytes into a ChangeHash and is where we would handle future inconsistencies in hash format (not that I expect any at this point). If possible I think it would be best to expose this method up through the Uniffi UDL rather than assuming that any 32 byte array is a valid change hash. (This also applies to the serialization step, except we're already using ChangeHash::as_bytes when we generate the bytes which we pass to the Swift side).

@heckj heckj added enhancement New feature or request good first issue Good for newcomers labels Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant