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

Add Wasm Proof, rename Signature structs to Proof #776

Merged
merged 11 commits into from
Mar 31, 2022
Merged

Conversation

cycraig
Copy link
Contributor

@cycraig cycraig commented Mar 30, 2022

Description of change

Renames Signature, SignatureValue, and SignatureOptions to Proof, ProofValue and ProofOptions respectively. This is to avoid duplicate Signature definitions conflicting in the Wasm bindings.

Also adds Wasm bindings for Proof to avoid returning the any type in WasmDocument and WasmDiffMessage. Also changes the type of properties in CreateServiceOptions to avoid any.

Added

  • Add WasmProof.

Changed

  • Change WasmDocument.proof() return from any to WasmProof.
  • Change WasmDiffMessage.proof() return from any to WasmProof.
  • Rename Signature to Proof.
  • Rename SignatureValue to ProofValue.
  • Rename SignatureOptions to ProofOptions.
  • Rename TrySignature to GetSignature.
  • Rename TrySignatureMut to GetSignatureMut.

Removed

  • Remove TrySignature::try_signature.
  • Remove TrySignatureMut::try_signature_mut.

Type of change

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Wasm tests and examples pass locally.

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@cycraig cycraig added Wasm Related to Wasm bindings. Becomes part of the Wasm changelog Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Mar 30, 2022
@cycraig cycraig added this to the v0.5 Features milestone Mar 30, 2022
@cycraig cycraig self-assigned this Mar 30, 2022
@cycraig cycraig changed the title Rename Signature structs to Proof Add Wasm Proof, rename Signature structs to Proof Mar 30, 2022
Copy link
Contributor

@abdulmth abdulmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just wondering if renaming GetSignature to GetProof makes sense, same for GetSignatureMut

@cycraig
Copy link
Contributor Author

cycraig commented Mar 31, 2022

wondering if renaming GetSignature to GetProof makes sense, same for GetSignatureMut

I'm not too fussed on leaving those as GetSignature since they're mostly for internal use (but have to be public). My reasoning for leaving them as GetSignature is that they're used within the Sign and Verify traits, where the term makes more sense than proof.

@cycraig cycraig merged commit a6fa2b0 into dev Mar 31, 2022
@cycraig cycraig deleted the feat/wasm-proof branch March 31, 2022 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
Development

Successfully merging this pull request may close these issues.

3 participants