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

feature/VDX-341 #297

Open
wants to merge 21 commits into
base: feature/SPRIND-137
Choose a base branch
from
Open

feature/VDX-341 #297

wants to merge 21 commits into from

Conversation

sanderPostma
Copy link
Contributor

@sanderPostma sanderPostma commented Dec 19, 2024

BEWARE this is based against SPRIND-137 so do not merge to develop until that one is merged,

# Conflicts:
#	packages/ebsi-support/package.json
#	packages/mdl-mdoc/package.json
#	packages/oid4vci-holder/package.json
#	packages/oid4vci-issuer-rest-api/package.json
#	packages/oid4vci-issuer-rest-client/package.json
#	packages/oid4vci-issuer-store/package.json
#	packages/oid4vci-issuer/package.json
#	packages/siopv2-oid4vp-common/package.json
#	packages/siopv2-oid4vp-op-auth/package.json
#	packages/siopv2-oid4vp-rp-auth/package.json
#	packages/siopv2-oid4vp-rp-rest-api/package.json
#	packages/w3c-vc-api/package.json
#	pnpm-lock.yaml
@sanderPostma sanderPostma changed the base branch from develop to feature/SPRIND-137 December 19, 2024 16:36
…/VDX-341

# Conflicts:
#	packages/ebsi-support/package.json
#	packages/mdl-mdoc/package.json
#	packages/oid4vci-holder/package.json
#	packages/oid4vci-issuer-rest-api/package.json
#	packages/oid4vci-issuer-rest-client/package.json
#	packages/oid4vci-issuer-store/package.json
#	packages/oid4vci-issuer/package.json
#	packages/siopv2-oid4vp-common/package.json
#	packages/siopv2-oid4vp-op-auth/package.json
#	packages/siopv2-oid4vp-rp-auth/package.json
#	packages/siopv2-oid4vp-rp-rest-api/package.json
#	packages/w3c-vc-api/package.json
#	pnpm-lock.yaml
@sanderPostma sanderPostma marked this pull request as ready for review December 20, 2024 15:38
# Conflicts:
#	packages/ebsi-support/package.json
#	packages/mdl-mdoc/package.json
#	packages/oid4vci-holder/package.json
#	packages/oid4vci-issuer-rest-api/package.json
#	packages/oid4vci-issuer-rest-client/package.json
#	packages/oid4vci-issuer-store/package.json
#	packages/oid4vci-issuer/package.json
#	packages/siopv2-oid4vp-common/package.json
#	packages/siopv2-oid4vp-op-auth/package.json
#	packages/siopv2-oid4vp-rp-auth/package.json
#	packages/siopv2-oid4vp-rp-rest-api/package.json
#	packages/w3c-vc-api/package.json
#	pnpm-lock.yaml
…/VDX-341

# Conflicts:
#	packages/ebsi-support/package.json
#	packages/mdl-mdoc/package.json
#	packages/oid4vci-holder/package.json
#	packages/oid4vci-issuer-rest-api/package.json
#	packages/oid4vci-issuer-rest-client/package.json
#	packages/oid4vci-issuer-store/package.json
#	packages/oid4vci-issuer/package.json
#	packages/siopv2-oid4vp-common/package.json
#	packages/siopv2-oid4vp-op-auth/package.json
#	packages/siopv2-oid4vp-rp-auth/package.json
#	packages/siopv2-oid4vp-rp-rest-api/package.json
#	packages/w3c-vc-api/package.json
#	pnpm-lock.yaml
entity.dcqlPayload = JSON.stringify({
credentials: [
{
id: 'credential1',
Copy link

Choose a reason for hiding this comment

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

is there any kinda of validation on this ID? for example can it be duplicated or null?

Copy link
Contributor Author

@sanderPostma sanderPostma Jan 8, 2025

Choose a reason for hiding this comment

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

The object in question is a query, the field can be anything or be omitted just like could be done with SQL queries

import { VerificationMethod } from '@sphereon/ssi-types'
import { JsonWebKey2020, P256Key2021, P384Key2021, P521Key2021 } from '@transmute/web-crypto-key-pair'
import { Ed25519VerificationKey2018 } from '@transmute/ed25519-key-pair'
import { EcdsaSecp256k1VerificationKey2019 } from '@transmute/secp256k1-key-pair'

// import { getJwaAlgFromJwk } from '@transmute/web-crypto-key-pair/dist/signatures/jws'
Copy link

Choose a reason for hiding this comment

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

can it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not my line / not commented out by me.
image

I typically do not remove other people's comments. Perhaps this one is very trivial, maybe it's something that still has to be hooked up in the future, I wouldn't know..
We can create a rule to clean up commented out imports, but until then I do not touch them.

createdAt: Date
lastUpdatedAt: Date
}

export type NonPersistedPresentationDefinitionItem = Omit<PresentationDefinitionItem, 'id' | 'createdAt' | 'lastUpdatedAt'>
export type PartialPresentationDefinitionItem = Partial<PresentationDefinitionItem>
export type PresentationDefinitionItemFilter = Partial<Omit<PresentationDefinitionItem, 'definitionPayload'>> // TODO add logic to linearize & hash definitionPayload into a separate column so we can filter on it?
export type PresentationDefinitionItemFilter = Partial<Omit<PresentationDefinitionItem, 'definitionPayload' | 'dcqlPayload'>> // TODO add logic to linearize & hash definitionPayload into a separate column so we can filter on it?
Copy link

Choose a reason for hiding this comment

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

can we move this todo to a ticket and link it on the comment? it can easily be lost on the code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I changed my mind and removed the TODO. The same presentation definition payload can be used for multiple configurations and retrieving records by payload hash may not return the intended record or multiple records, so better to avoid it. The caller just needs to the either the unique ID or definitionId + tenantId + version to query the correct record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants