@sphereon/ssi-sdk.credential-vcdm-jsonld-provider 0.33.1-feature.jose.vcdm.61 → 0.33.1-feature.jose.vcdm.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk.credential-vcdm-jsonld-provider",
3
- "version": "0.33.1-feature.jose.vcdm.61+a359941a",
3
+ "version": "0.33.1-feature.jose.vcdm.63+022136f8",
4
4
  "source": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -42,12 +42,12 @@
42
42
  "@noble/hashes": "1.6.1",
43
43
  "@sphereon/ssi-sdk-ext.did-utils": "0.28.1-feature.jose.vcdm.25",
44
44
  "@sphereon/ssi-sdk-ext.key-utils": "0.28.1-feature.jose.vcdm.25",
45
- "@sphereon/ssi-sdk.agent-config": "0.33.1-feature.jose.vcdm.61+a359941a",
46
- "@sphereon/ssi-sdk.core": "0.33.1-feature.jose.vcdm.61+a359941a",
47
- "@sphereon/ssi-sdk.credential-vcdm": "0.33.1-feature.jose.vcdm.61+a359941a",
48
- "@sphereon/ssi-sdk.data-store": "0.33.1-feature.jose.vcdm.61+a359941a",
49
- "@sphereon/ssi-sdk.vc-status-list": "0.33.1-feature.jose.vcdm.61+a359941a",
50
- "@sphereon/ssi-types": "0.33.1-feature.jose.vcdm.61+a359941a",
45
+ "@sphereon/ssi-sdk.agent-config": "0.33.1-feature.jose.vcdm.63+022136f8",
46
+ "@sphereon/ssi-sdk.core": "0.33.1-feature.jose.vcdm.63+022136f8",
47
+ "@sphereon/ssi-sdk.credential-vcdm": "0.33.1-feature.jose.vcdm.63+022136f8",
48
+ "@sphereon/ssi-sdk.data-store": "0.33.1-feature.jose.vcdm.63+022136f8",
49
+ "@sphereon/ssi-sdk.vc-status-list": "0.33.1-feature.jose.vcdm.63+022136f8",
50
+ "@sphereon/ssi-types": "0.33.1-feature.jose.vcdm.63+022136f8",
51
51
  "@veramo-community/lds-ecdsa-secp256k1-recovery2020": "github:uport-project/EcdsaSecp256k1RecoverySignature2020",
52
52
  "@veramo/core": "4.2.0",
53
53
  "@veramo/utils": "4.2.0",
@@ -118,5 +118,5 @@
118
118
  "peerDependencies": {
119
119
  "react-native-securerandom": "^1.0.1"
120
120
  },
121
- "gitHead": "a359941a2b84a7b86ff515b0f78080ff075e97b6"
121
+ "gitHead": "022136f82e8b5b0b83cc4b475b4b83eb5dc63e14"
122
122
  }
@@ -12,7 +12,6 @@ import { CredentialProviderJsonld } from '../agent'
12
12
  import { LdDefaultContexts } from '../ld-default-contexts'
13
13
  import { SphereonEd25519Signature2018, SphereonEd25519Signature2020 } from '../suites'
14
14
 
15
-
16
15
  import { bedrijfsInformatieV1, exampleV1 } from './mocks'
17
16
  import { ContextDoc, IVcdmCredentialPlugin, VcdmCredentialPlugin } from '@sphereon/ssi-sdk.credential-vcdm'
18
17
  import { SphereonKeyManager } from '@sphereon/ssi-sdk-ext.key-manager'
@@ -56,8 +55,7 @@ describe('credential-LD full flow', () => {
56
55
  }),
57
56
  }),
58
57
  new IdentifierResolution({}),
59
- new VcdmCredentialPlugin({issuers: [jsonld]})
60
-
58
+ new VcdmCredentialPlugin({ issuers: [jsonld] }),
61
59
  ],
62
60
  })
63
61
  didKeyIdentifier = await agent.didManagerCreate({ options: { type: 'Ed25519' } })
@@ -156,7 +156,6 @@ export class CredentialProviderJsonld implements IVcdmCredentialProvider {
156
156
  delete presentation.issuanceDate
157
157
  delete presentation.validFrom
158
158
 
159
-
160
159
  let identifier: IIdentifier
161
160
  try {
162
161
  identifier = await context.agent.didManagerGet({ did: holder })
package/src/enums.ts CHANGED
@@ -5,7 +5,6 @@ export const ControllerProofPurpose = sigpkg.purposes.ControllerProofPurpose
5
5
  export const AssertionProofPurpose = sigpkg.purposes.AssertionProofPurpose
6
6
  export const AuthenticationProofPurpose = sigpkg.purposes.AuthenticationProofPurpose
7
7
 
8
-
9
8
  /**
10
9
  * Plugin method map interface
11
10
  * @public
@@ -6,8 +6,6 @@
6
6
  import { ContextDoc } from '@sphereon/ssi-sdk.credential-vcdm'
7
7
  import { isIterable, type OrPromise, type RecordLike } from '@veramo/utils'
8
8
 
9
-
10
-
11
9
  export class LdContextLoader {
12
10
  private readonly contexts: Record<string, OrPromise<ContextDoc>>
13
11
 
@@ -66,17 +66,13 @@ export class LdCredentialModule {
66
66
  const purpose = args.purpose
67
67
  debug(`Issue VC method called for ${key.kid}...`)
68
68
  // TODO: try multiple matching suites until one works or list is exhausted
69
- const suite = this.ldSuiteLoader.getSignatureSuiteForKeyType(
70
- key.type,
71
- key.meta?.verificationMethod?.type ?? '',
72
- )[0]
69
+ const suite = this.ldSuiteLoader.getSignatureSuiteForKeyType(key.type, key.meta?.verificationMethod?.type ?? '')[0]
73
70
 
74
71
  const documentLoader = this.ldDocumentLoader.getLoader(context, {
75
72
  attemptToFetchContexts: true,
76
73
  verifiableData: credential,
77
74
  })
78
75
 
79
-
80
76
  // some suites can modify the incoming credential (e.g. add required contexts)
81
77
  suite.preSigningCredModification(credential)
82
78
  debug(`Signing suite will be retrieved for ${verificationMethodId}...`)
@@ -131,10 +127,7 @@ export class LdCredentialModule {
131
127
  context: IVcdmIssuerAgentContext,
132
128
  ): Promise<VerifiablePresentationSP> {
133
129
  // TODO: try multiple matching suites until one works or list is exhausted
134
- const suite = this.ldSuiteLoader.getSignatureSuiteForKeyType(
135
- key.type,
136
- key.meta?.verificationMethod?.type ?? '',
137
- )[0]
130
+ const suite = this.ldSuiteLoader.getSignatureSuiteForKeyType(key.type, key.meta?.verificationMethod?.type ?? '')[0]
138
131
  const documentLoader = this.ldDocumentLoader.getLoader(context, {
139
132
  attemptToFetchContexts: true,
140
133
  verifiableData: presentation,
@@ -43,7 +43,16 @@ export class LdDocumentLoader {
43
43
  {
44
44
  attemptToFetchContexts = false,
45
45
  verifiableData,
46
- }: { attemptToFetchContexts: boolean; verifiableData: VerifiableCredential | VerifiableCredentialSP | VerifiablePresentation |VerifiablePresentationSP | CredentialPayload | PresentationPayload },
46
+ }: {
47
+ attemptToFetchContexts: boolean
48
+ verifiableData:
49
+ | VerifiableCredential
50
+ | VerifiableCredentialSP
51
+ | VerifiablePresentation
52
+ | VerifiablePresentationSP
53
+ | CredentialPayload
54
+ | PresentationPayload
55
+ },
47
56
  ) {
48
57
  return sigpkg.extendContextLoader(async (url: string) => {
49
58
  if (!url || url.trim().length === 0) {
@@ -18,7 +18,6 @@ export class SphereonEd25519Signature2020 extends SphereonLdSignature {
18
18
  return ['Ed25519VerificationKey2020', 'Ed25519VerificationKey2018']
19
19
  }
20
20
 
21
-
22
21
  getSupportedProofType(): string {
23
22
  return 'Ed25519Signature2020'
24
23
  }