Skip to content

Commit

Permalink
chore: PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Feb 6, 2025
1 parent ba7b1c0 commit e542979
Show file tree
Hide file tree
Showing 21 changed files with 151 additions and 149 deletions.
8 changes: 4 additions & 4 deletions packages/ebsi-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"dependencies": {
"@ethersproject/random": "^5.7.0",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/pex-models": "^2.3.2",
"@sphereon/ssi-sdk-ext.did-resolver-ebsi": "0.27.0",
Expand Down Expand Up @@ -44,8 +44,8 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.27.0",
"@sphereon/ssi-sdk-ext.kms-local": "0.27.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/mdl-mdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/pex-models": "^2.3.2",
Expand All @@ -35,8 +35,8 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.27.0",
"@sphereon/ssi-sdk-ext.kms-local": "0.27.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/oid4vci-holder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
"dependencies": {
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-client": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
Expand Down Expand Up @@ -45,7 +45,7 @@
"xstate": "^4.38.3"
},
"devDependencies": {
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.27.0",
"@types/i18n-js": "^3.8.9",
Expand Down
6 changes: 3 additions & 3 deletions packages/oid4vci-issuer-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"start:dev": "ts-node __tests__/RestAPI.ts"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-issuer": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-issuer-server": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-issuer": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-issuer-server": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/oid4vci-issuer-rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "4.2.0",
"cross-fetch": "^3.1.8"
Expand Down
2 changes: 1 addition & 1 deletion packages/oid4vci-issuer-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/oid4vci-issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-issuer": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vci-issuer": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
Expand All @@ -36,7 +36,7 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-uni-client": "^0.6.3",
"@veramo/did-provider-key": "4.2.0",
"@veramo/did-resolver": "4.2.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/oid4vci-issuer/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ export async function getCredentialSignerCallback(
credential: CredentialIssuanceInput
jwtVerifyResult: JwtVerifyResult<DIDDocument>
format?: OID4VCICredentialFormat
statusListOpts?: Array<StatusListOpts>
statusLists?: Array<StatusListOpts>
}): Promise<W3CVerifiableCredential | CompactSdJwtVc> {
const { jwtVerifyResult, format, statusListOpts } = args
const { jwtVerifyResult, format, statusLists } = args
const credential = args.credential as ICredential // TODO: SDJWT
let proofFormat: ProofFormat

Expand All @@ -212,7 +212,7 @@ export async function getCredentialSignerCallback(
// TODO: We should extend the plugin capabilities of issuance so we do not have to tuck this into the sign callback
if (contextHasPlugin<IStatusListPlugin>(context, 'slAddStatusToCredential')) {
// Add status list if enabled (and when the input has a credentialStatus object (can be empty))
const credentialStatusVC = await context.agent.slAddStatusToCredential({ credential, statusListOpts })
const credentialStatusVC = await context.agent.slAddStatusToCredential({ credential, statusLists: statusLists })
if (credential.credentialStatus && !credential.credentialStatus.statusListCredential) {
credential.credentialStatus = credentialStatusVC.credentialStatus
}
Expand Down Expand Up @@ -247,9 +247,9 @@ export async function getCredentialSignerCallback(
}

if (contextHasPlugin<IStatusListPlugin>(context, 'slAddStatusToSdJwtCredential')) {
if ((sdJwtPayload.status && sdJwtPayload.status.status_list) || (statusListOpts && statusListOpts.length > 0)) {
if ((sdJwtPayload.status && sdJwtPayload.status.status_list) || (statusLists && statusLists.length > 0)) {
// Add status list if enabled (and when the input has a credentialStatus object (can be empty))
const credentialStatusVC = await context.agent.slAddStatusToSdJwtCredential({ credential: sdJwtPayload, statusListOpts })
const credentialStatusVC = await context.agent.slAddStatusToSdJwtCredential({ credential: sdJwtPayload, statusLists: statusLists })
if (sdJwtPayload.status?.status_list?.idx) {
if (!credentialStatusVC.status || !credentialStatusVC.status.status_list) {
// TODO check, looks like sdJwtPayload and credentialStatusVC is the same
Expand Down
2 changes: 1 addition & 1 deletion packages/siopv2-oid4vp-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"access": "public"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"uint8arrays": "3.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/siopv2-oid4vp-op-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/pex-models": "^2.3.2",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/siopv2-oid4vp-rp-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/did-auth-siop-adapter": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/oid4vc-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/pex": "5.0.0-unstable.28",
"@sphereon/ssi-sdk-ext.did-utils": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/siopv2-oid4vp-rp-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start:dev": "ts-node __tests__/RestAPI.ts"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.credential-validation": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/vc-status-list-issuer-rest-api/src/api-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function getStatusListCredentialIndexStatusEndpoint(router: Router, conte
return
}

const path = opts?.path ?? '/status-lists/:statusListId/entry/:entryId'
const path = opts?.path ?? '/status-lists/:statusListId/status/entry-by-id/:entryId'
router.get(path, checkAuth(opts?.endpoint), async (request: Request, response: Response) => {
try {
const statusListIdType = (request.query.statusListIdType as StatusListIdType) ?? StatusListIdType.StatusListId
Expand Down Expand Up @@ -168,7 +168,7 @@ export function getStatusListCredentialIndexStatusEndpoint(router: Router, conte
}

response.statusCode = 200
return response.send({ ...entry, status })
return response.json({ ...entry, status })
} catch (e) {
return sendErrorResponse(response, 500, (e as Error).message, e)
}
Expand Down Expand Up @@ -228,7 +228,7 @@ export function getStatusListCredentialIndexStatusEndpointLegacy(router: Router,
}
}
response.statusCode = 200
return response.send({ ...entry, status }) // FIXME content type?
return response.json({ ...entry, status }) // FIXME content type?
} catch (e) {
return sendErrorResponse(response, 500, (e as Error).message, e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ describe('Status List VC handling', () => {
}
const result = await agent.slAddStatusToCredential({
credential: mockCredential,
statusListOpts: [
statusLists: [
{
statusListId: 'http://localhost/test/1',
statusListIndex: 123,
Expand All @@ -229,7 +229,7 @@ describe('Status List VC handling', () => {
}
const result = await agent.slAddStatusToCredential({
credential: mockCredential,
statusListOpts: [
statusLists: [
{
statusListId: 'http://localhost/test/1',
},
Expand Down Expand Up @@ -275,7 +275,7 @@ describe('Status List VC handling', () => {

const result = await agent.slAddStatusToCredential({
credential: mockCredential,
statusListOpts: [
statusLists: [
{
statusListCorrelationId: 'test-sl',
statusEntryCorrelationId: 'entry-456',
Expand Down Expand Up @@ -330,7 +330,7 @@ describe('Status List VC handling', () => {

const result = await agent.slAddStatusToSdJwtCredential({
credential: mockCredential,
statusListOpts: [{ statusListId: 'http://localhost/test/1' }],
statusLists: [{ statusListId: 'http://localhost/test/1' }],
})

expect(result.status?.status_list.uri).toBe('http://localhost/test/1')
Expand All @@ -351,7 +351,7 @@ describe('Status List VC handling', () => {

const result = await agent.slAddStatusToSdJwtCredential({
credential: mockCredential,
statusListOpts: [
statusLists: [
{
statusListId: 'http://localhost/test/1',
statusListIndex: 10,
Expand Down
2 changes: 1 addition & 1 deletion packages/vc-status-list-issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"devDependencies": {
"@babel/preset-typescript": "^7.24.7",
"@sphereon/did-uni-client": "^0.6.3",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.27.0",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.27.0",
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.27.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/vc-status-list-issuer/src/agent/StatusListPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ export class StatusListPlugin implements IAgentPlugin {
await handleCredentialStatus(credential, {
...rest,
credentialId,
statusListOpts: [{ statusListId: existingStatusId }],
statusLists: [{ statusListId: existingStatusId }],
driver,
})
return credential
}
}

const statusListOpts = rest.statusListOpts && rest.statusListOpts.length > 0 ? rest.statusListOpts : [{ statusListId: this.defaultStatusListId }]
const statusListOpts = rest.statusLists && rest.statusLists.length > 0 ? rest.statusLists : [{ statusListId: this.defaultStatusListId }]
logger.debug(`Adding new status using ${statusListOpts.length} status list option(s)`)
const credentialId = credential.id ?? rest.credentialId
for (const opt of statusListOpts) {
Expand All @@ -205,7 +205,7 @@ export class StatusListPlugin implements IAgentPlugin {
await handleCredentialStatus(credential, {
...rest,
credentialId,
statusListOpts: [
statusLists: [
{
...opt,
statusListId: effectiveStatusListId,
Expand Down Expand Up @@ -243,21 +243,21 @@ export class StatusListPlugin implements IAgentPlugin {
const driver = await this.getDriverForStatusListOption(existingStatusUri)
await handleSdJwtCredentialStatus(credential, {
...rest,
statusListOpts: [{ ...rest.statusListOpts, statusListId: existingStatusUri }],
statusLists: [{ ...rest.statusLists, statusListId: existingStatusUri }],
driver,
})
return credential
}
}

const statusListOpts = rest.statusListOpts && rest.statusListOpts.length > 0 ? rest.statusListOpts : [{ statusListId: this.defaultStatusListId }]
const statusListOpts = rest.statusLists && rest.statusLists.length > 0 ? rest.statusLists : [{ statusListId: this.defaultStatusListId }]
logger.info(`Adding new status using status list options with ID ${statusListOpts[0].statusListId ?? this.defaultStatusListId}`)
const firstOpt = statusListOpts[0]
const effectiveStatusListId = firstOpt.statusListId ?? this.defaultStatusListId
const driver = await this.getDriverForStatusListOption(effectiveStatusListId, firstOpt.statusListCorrelationId)
await handleSdJwtCredentialStatus(credential, {
...rest,
statusListOpts: [
statusLists: [
{
...firstOpt,
statusListId: effectiveStatusListId,
Expand Down
4 changes: 2 additions & 2 deletions packages/vc-status-list-issuer/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function getDriverAndStatusList(
*/
function getCredentialStatusListOpts(credential: CredentialWithStatusSupport, opts?: IIssueCredentialStatusOpts): Array<StatusListOpts> {
// Start with any options provided via the opts parameter
const statusListOpts: StatusListOpts[] = [...(opts?.statusListOpts ?? [])]
const statusListOpts: StatusListOpts[] = [...(opts?.statusLists ?? [])]
// If none were provided, try to derive them from the credential's credentialStatus
if (statusListOpts.length === 0 && credential.credentialStatus) {
if (Array.isArray(credential.credentialStatus)) {
Expand Down Expand Up @@ -63,7 +63,7 @@ function getCredentialStatusListOpts(credential: CredentialWithStatusSupport, op
* Extracts status list options from an SD‑JWT credential.
*/
function getSdJwtStatusListOpts(credential: SdJwtVcPayload, opts?: IIssueCredentialStatusOpts): StatusListOpts[] {
const statusListOpts: StatusListOpts[] = [...(opts?.statusListOpts ?? [])]
const statusListOpts: StatusListOpts[] = [...(opts?.statusLists ?? [])]
if (statusListOpts.length === 0 && credential.status?.status_list) {
statusListOpts.push({
statusListId: credential.status.status_list.uri,
Expand Down
2 changes: 1 addition & 1 deletion packages/vc-status-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@sphereon/ssi-sdk-ext.jwt-service": "0.27.0",
"@sphereon/ssi-types": "workspace:*",
"@sphereon/vc-status-list": "7.0.0-next.0",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/oid4vci-common": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/kmp-cbor": "0.2.0-SNAPSHOT.25",
"@sd-jwt/core": "^0.7.2",
"@sd-jwt/sd-jwt-vc": "^0.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/vc-status-list/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export type IAddStatusToSdJwtCredentialArgs = Omit<IIssueCredentialStatusOpts, '

export interface IIssueCredentialStatusOpts {
dataSource?: DataSource
statusListOpts?: Array<StatusListOpts>
statusLists?: Array<StatusListOpts>
credentialId?: string // An id to use for the credential. Normally should be set as the crdential.id value
value?: string
}
Expand Down
2 changes: 1 addition & 1 deletion packages/w3c-vc-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start:dev": "ts-node __tests__/agent.ts"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.345",
"@sphereon/did-auth-siop": "0.16.1-feature.IATAB2B.52.355",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
Expand Down
Loading

0 comments on commit e542979

Please sign in to comment.