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

fix: boolean values #105

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .yarn/patches/@sd-jwt-decode-npm-0.2.1-4ba346c112.patch

This file was deleted.

930 changes: 930 additions & 0 deletions .yarn/patches/@sphereon-pex-npm-3.3.2-144d9252ec.patch

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/expo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-app",
"version": "1.3.5",
"version": "1.3.6",
"main": "expo-router/entry",
"private": true,
"scripts": {
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@
"resolutions": {
"@unimodules/react-native-adapter": "./noop",
"@unimodules/core": "./noop",
"@sd-jwt/decode@^0.2.0": "patch:@sd-jwt/decode@npm%3A0.2.1#./.yarn/patches/@sd-jwt-decode-npm-0.2.1-4ba346c112.patch",
"@sd-jwt/decode@^0.2.1": "patch:@sd-jwt/decode@npm%3A0.2.1#./.yarn/patches/@sd-jwt-decode-npm-0.2.1-4ba346c112.patch",
"@sd-jwt/[email protected]": "patch:@sd-jwt/decode@npm%3A0.2.1#./.yarn/patches/@sd-jwt-decode-npm-0.2.1-4ba346c112.patch",
"@sd-jwt/decode@^0.3.0": "patch:@sd-jwt/decode@npm%3A0.2.1#./.yarn/patches/@sd-jwt-decode-npm-0.2.1-4ba346c112.patch"
"@sphereon/pex@^3.3.2": "patch:@sphereon/pex@npm%3A3.3.2#./.yarn/patches/@sphereon-pex-npm-3.3.2-144d9252ec.patch"
},
"dependencies": {
"@babel/runtime": "^7.18.9",
Expand Down
16 changes: 8 additions & 8 deletions packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"private": true,
"main": "src/index.ts",
"dependencies": {
"@credo-ts/anoncreds": "0.5.1-alpha.17",
"@credo-ts/askar": "0.5.1-alpha.17",
"@credo-ts/cheqd": "0.5.1-alpha.17",
"@credo-ts/core": "0.5.1-alpha.17",
"@credo-ts/indy-vdr": "0.5.1-alpha.17",
"@credo-ts/openid4vc": "0.5.1-alpha.17",
"@credo-ts/question-answer": "0.5.1-alpha.17",
"@credo-ts/anoncreds": "0.5.1-alpha.23",
"@credo-ts/askar": "0.5.1-alpha.23",
"@credo-ts/cheqd": "0.5.1-alpha.23",
"@credo-ts/core": "0.5.1-alpha.23",
"@credo-ts/indy-vdr": "0.5.1-alpha.23",
"@credo-ts/openid4vc": "0.5.1-alpha.23",
"@credo-ts/question-answer": "0.5.1-alpha.23",
"@credo-ts/react-hooks": "0.6.1",
"@credo-ts/react-native": "0.5.1-alpha.17",
"@credo-ts/react-native": "0.5.1-alpha.23",
"@internal/utils": "*",
"@tanstack/react-query": "^4.33.0",
"query-string": "^8.1.0",
Expand Down
9 changes: 7 additions & 2 deletions packages/agent/src/display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { CredentialExchangeRecord, W3cCredentialRecord } from '@credo-ts/co

import { Hasher, SdJwtVcRecord, ClaimFormat, JsonTransformer } from '@credo-ts/core'
import { sanitizeString, getHostNameFromUrl } from '@internal/utils'
import { decodeSdJwtVc } from '@sd-jwt/decode'
import { decodeSdJwtSync, getClaimsSync } from '@sd-jwt/decode'

import { getDidCommCredentialExchangeDisplayMetadata } from './didcomm/metadata'
import { getOpenId4VcCredentialMetadata } from './openid4vc/metadata'
Expand Down Expand Up @@ -327,9 +327,14 @@ export function getCredentialForDisplay(credentialRecord: W3cCredentialRecord |
// FIXME: we should probably add a decode method on the SdJwtVcRecord
// as you now need the agent context to decode the sd-jwt vc, while that's
// not really needed
const { decodedPayload } = decodeSdJwtVc(credentialRecord.compactSdJwtVc, (data, alg) =>
const { disclosures, jwt } = decodeSdJwtSync(credentialRecord.compactSdJwtVc, (data, alg) =>
Hasher.hash(data, alg)
)
const decodedPayload: Record<string, unknown> = getClaimsSync(
jwt.payload,
disclosures,
(data, alg) => Hasher.hash(data, alg)
)

const openId4VcMetadata = getOpenId4VcCredentialMetadata(credentialRecord)
const issuerDisplay = getSdJwtIssuerDisplay(openId4VcMetadata)
Expand Down
Loading
Loading