-
Notifications
You must be signed in to change notification settings - Fork 85
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 Credential
and Presentation
field getters and constructors
#815
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Apr 19, 2022
WasmCredential, WasmPresentation
cycraig
changed the title
[WIP] Add Wasm
Add Wasm Apr 20, 2022
Credential
and Presentation
field getters and constructorsCredential
and Presentation
field getters and constructors
HenriqueNogara
approved these changes
Apr 21, 2022
abdulmth
approved these changes
Apr 22, 2022
There was a problem hiding this 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, minor comments, very readable proc-macro!
4 tasks
…feat/credential-constructors
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Adds typed constructors for the
Credential
andPresentation
structs in the Wasm bindings, and adds Typescript interfaces for the fields contained in them.This changes several field names in Rust for consistency and also gets rid of (I think) the last
any
function parameters in the Wasm bindings.NOTE: this makes breaking changes to the Wasm examples incompatible with 0.5.0. This may confuse developers using version 0.5.0 if released to the wiki prior to 0.6.0.
Added
Credential
field getter functions.Presentation
field getter functions.Evidence
Typescript interface.Issuer
Typescript interface.Policy
Typescript interface.RefreshService
Typescript interface.Schema
Typescript interface.Status
Typescript interface.Subject
Typescript interface.Credential
constructor.Credential.BaseContext
.Credential.BaseType
.Presentation.BaseContext
.Presentation.BaseType
.Changed
Presentation
constructor to use an interface.WasmDocument.signCredential
parameter fromany
toCredential
.WasmDocument.signPresentation
parameter fromany
toCredential
.Refresh
toRefreshService
.CredentialBuilder::refresh
torefresh_service
.CredentialBuilder::policy
toterms_of_use
.PresentationBuilder::refresh
torefresh_service
.PresentationBuilder::policy
toterms_of_use
.Removed
Credential.issue()
.Credential.extend()
.Links to any relevant issues
Resolves #813.
Type of change
How the change has been tested
Added multiple Mocha unit tests that pass with
npm run test:unit:node
. Wasm examples also pass locally.Change checklist