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

Improve Proof #1209

Merged
merged 12 commits into from
Jul 31, 2023
Merged

Improve Proof #1209

merged 12 commits into from
Jul 31, 2023

Conversation

abdulmth
Copy link
Contributor

@abdulmth abdulmth commented Jul 28, 2023

Description of change

Improve the Proof type in Credential and Presentation.
Proof now must include a type property to enable matching different proof types during validation.

@abdulmth abdulmth self-assigned this Jul 28, 2023
@abdulmth abdulmth added Enhancement New feature or improvement to an existing feature Wasm Related to Wasm bindings. Becomes part of the Wasm changelog Added A new feature that requires a minor release. Part of "Added" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Jul 28, 2023
bindings/wasm/src/credential/credential.rs Show resolved Hide resolved
identity_credential/src/credential/proof.rs Outdated Show resolved Hide resolved
identity_credential/src/credential/proof.rs Outdated Show resolved Hide resolved
identity_credential/src/credential/proof.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter left a comment

Choose a reason for hiding this comment

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

LGTM!

Please don't use _type anywhere.


/// Returns the type of proof.
#[wasm_bindgen(js_name = "type")]
pub fn _type(&self) -> String {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn _type(&self) -> String {
pub fn type_(&self) -> String {

#[wasm_bindgen(js_class = Proof)]
impl WasmProof {
#[wasm_bindgen(constructor)]
pub fn constructor(_type: String, properties: JsValue) -> Result<WasmProof> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn constructor(_type: String, properties: JsValue) -> Result<WasmProof> {
pub fn constructor(type_: String, properties: JsValue) -> Result<WasmProof> {


impl Proof {
/// Creates a new `Proof`.
pub fn new(_type: String, properties: Object) -> Proof {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn new(_type: String, properties: Object) -> Proof {
pub fn new(type_: String, properties: Object) -> Proof {

@abdulmth abdulmth merged commit ec1b8ad into main Jul 31, 2023
10 checks passed
@abdulmth abdulmth deleted the feat/proof branch July 31, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added A new feature that requires a minor release. Part of "Added" section in changelog Enhancement New feature or improvement to an existing feature 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.

2 participants