openwallet-foundation-labs / sd-jwt-js

A JavaScript implementation of the Selective Disclosure JWT (SD-JWT) spec.
https://sdjwt.js.org/
Apache License 2.0
36 stars 12 forks source link

feat: make _digest value public in disclosure #151

Closed lukasjhan closed 6 months ago

lukasjhan commented 6 months ago

I made _digest value in disclosure as public.

When implementing features in holder side, usually we decode the disclosures and make a logic. In this situation we normally have _digest value, not need to calculate. So delivering hasher to get _digest value is not necessary.

It closes #150

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.73%. Comparing base (612bf82) to head (19445b7).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #151 +/- ## ======================================= Coverage 97.73% 97.73% ======================================= Files 23 23 Lines 1983 1991 +8 Branches 284 284 ======================================= + Hits 1938 1946 +8 Misses 45 45 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lukasjhan commented 6 months ago

Hmm.. It's strange. biome success in local env

cre8 commented 6 months ago

Hmm.. It's strange. biome success in local env

Same for me. Running biome ci . or pnpm run format or lint locally is fine.... There is also no update for the biome action in the cicd that could cause that

cre8 commented 6 months ago

@lukasjhan found the error: Biome release a new minor update, that added more rules. Locally, we are using version 1.5.0, but when we used the github action, it is always going for latest, in our case 1.6.0. So there were some new rules that causes the issue. I applied the changes, tests are passing.

Changes were applied via biome directly and not manually. Since all tests passed it should be fine

cre8 commented 6 months ago

I referenced the biome call to the package json to make sure we got the same versions and therefore the same behavior local and in the ci.

lukasjhan commented 6 months ago

@cre8 Thank you :)