@veramo/credential-ld 5.6.1-next.46 → 5.6.1-next.53
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/build/action-handler.d.ts +49 -2
- package/build/action-handler.d.ts.map +1 -1
- package/build/action-handler.js +7 -7
- package/build/action-handler.js.map +1 -1
- package/build/ld-context-loader.js.map +1 -1
- package/build/ld-credential-module.d.ts +11 -6
- package/build/ld-credential-module.d.ts.map +1 -1
- package/build/ld-credential-module.js +12 -9
- package/build/ld-credential-module.js.map +1 -1
- package/build/ld-default-contexts.js +2 -2
- package/build/ld-default-contexts.js.map +1 -1
- package/build/ld-suites.js.map +1 -1
- package/build/plugin.schema.d.ts +48 -0
- package/build/plugin.schema.d.ts.map +1 -1
- package/build/plugin.schema.js +62 -14
- package/build/plugin.schema.js.map +1 -1
- package/build/suites/EcdsaSecp256k1RecoverySignature2020.js.map +1 -1
- package/build/suites/Ed25519Signature2020.js.map +1 -1
- package/build/tsdoc-metadata.json +1 -1
- package/build/types.d.ts +5 -5
- package/build/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/action-handler.ts +12 -9
- package/src/ld-credential-module.ts +20 -13
- package/src/plugin.schema.ts +62 -14
- package/src/types.ts +5 -4
|
@@ -15,6 +15,18 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
15
15
|
ICreateVerifiableCredentialLDArgs: {
|
|
16
16
|
type: string;
|
|
17
17
|
properties: {
|
|
18
|
+
resolutionOptions: {
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
publicKeyFormat: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
accept: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
18
30
|
credential: {
|
|
19
31
|
$ref: string;
|
|
20
32
|
description: string;
|
|
@@ -148,7 +160,6 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
148
160
|
})[];
|
|
149
161
|
};
|
|
150
162
|
"@context": {
|
|
151
|
-
/** {@inheritdoc ICredentialIssuerLD.verifyPresentationLD} */
|
|
152
163
|
$ref: string;
|
|
153
164
|
};
|
|
154
165
|
issuanceDate: {
|
|
@@ -179,6 +190,18 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
179
190
|
ICreateVerifiablePresentationLDArgs: {
|
|
180
191
|
type: string;
|
|
181
192
|
properties: {
|
|
193
|
+
resolutionOptions: {
|
|
194
|
+
type: string;
|
|
195
|
+
properties: {
|
|
196
|
+
publicKeyFormat: {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
accept: {
|
|
200
|
+
type: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
description: string;
|
|
204
|
+
};
|
|
182
205
|
presentation: {
|
|
183
206
|
$ref: string;
|
|
184
207
|
description: string;
|
|
@@ -307,6 +330,18 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
307
330
|
IVerifyCredentialLDArgs: {
|
|
308
331
|
type: string;
|
|
309
332
|
properties: {
|
|
333
|
+
resolutionOptions: {
|
|
334
|
+
type: string;
|
|
335
|
+
properties: {
|
|
336
|
+
publicKeyFormat: {
|
|
337
|
+
type: string;
|
|
338
|
+
};
|
|
339
|
+
accept: {
|
|
340
|
+
type: string;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
description: string;
|
|
344
|
+
};
|
|
310
345
|
credential: {
|
|
311
346
|
$ref: string;
|
|
312
347
|
description: string;
|
|
@@ -325,6 +360,18 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
325
360
|
IVerifyPresentationLDArgs: {
|
|
326
361
|
type: string;
|
|
327
362
|
properties: {
|
|
363
|
+
resolutionOptions: {
|
|
364
|
+
type: string;
|
|
365
|
+
properties: {
|
|
366
|
+
publicKeyFormat: {
|
|
367
|
+
type: string;
|
|
368
|
+
};
|
|
369
|
+
accept: {
|
|
370
|
+
type: string;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
description: string;
|
|
374
|
+
};
|
|
328
375
|
presentation: {
|
|
329
376
|
$ref: string;
|
|
330
377
|
description: string;
|
|
@@ -405,7 +452,7 @@ export declare class CredentialIssuerLD implements IAgentPlugin {
|
|
|
405
452
|
private findSigningKeyWithId;
|
|
406
453
|
/**
|
|
407
454
|
* Returns true if the key is supported by any of the installed LD Signature suites
|
|
408
|
-
* @param k - the key to
|
|
455
|
+
* @param k - the key to match
|
|
409
456
|
*
|
|
410
457
|
* @internal
|
|
411
458
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../src/action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEZ,IAAI,EAGJ,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAI9C,OAAO,EAOL,SAAS,EAET,UAAU,EAEX,MAAM,eAAe,CAAA;AAItB,OAAO,EACL,UAAU,EACV,iCAAiC,EACjC,mCAAmC,EACnC,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../src/action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEZ,IAAI,EAGJ,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAI9C,OAAO,EAOL,SAAS,EAET,UAAU,EAEX,MAAM,eAAe,CAAA;AAItB,OAAO,EACL,UAAU,EACV,iCAAiC,EACjC,mCAAmC,EACnC,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,YAA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OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,OAAO,CAAC;YAeL,oBAAoB;IAsClC;;;;;OAKG;IACG,kBAAkB,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;CAiBpD"}
|
package/build/action-handler.js
CHANGED
|
@@ -61,7 +61,7 @@ export class CredentialIssuerLD {
|
|
|
61
61
|
throw new Error('invalid_argument: args.presentation.holder must be a DID managed by this agent');
|
|
62
62
|
}
|
|
63
63
|
try {
|
|
64
|
-
const { signingKey, verificationMethodId } = await this.findSigningKeyWithId(context, identifier, args.keyRef);
|
|
64
|
+
const { signingKey, verificationMethodId } = await this.findSigningKeyWithId(context, identifier, args.keyRef, args.resolutionOptions);
|
|
65
65
|
let { now } = args;
|
|
66
66
|
if (typeof now === 'number') {
|
|
67
67
|
now = new Date(now * 1000);
|
|
@@ -94,7 +94,7 @@ export class CredentialIssuerLD {
|
|
|
94
94
|
throw new Error(`invalid_argument: args.credential.issuer must be a DID managed by this agent. ${e}`);
|
|
95
95
|
}
|
|
96
96
|
try {
|
|
97
|
-
const { signingKey, verificationMethodId } = await this.findSigningKeyWithId(context, identifier, args.keyRef);
|
|
97
|
+
const { signingKey, verificationMethodId } = await this.findSigningKeyWithId(context, identifier, args.keyRef, args.resolutionOptions);
|
|
98
98
|
let { now } = args;
|
|
99
99
|
if (typeof now === 'number') {
|
|
100
100
|
now = new Date(now * 1000);
|
|
@@ -113,7 +113,7 @@ export class CredentialIssuerLD {
|
|
|
113
113
|
if (typeof now === 'number') {
|
|
114
114
|
now = new Date(now * 1000);
|
|
115
115
|
}
|
|
116
|
-
return this.ldCredentialModule.verifyCredential(credential,
|
|
116
|
+
return this.ldCredentialModule.verifyCredential(credential, { ...args, now }, context);
|
|
117
117
|
}
|
|
118
118
|
/** {@inheritdoc ICredentialIssuerLD.verifyPresentationLD} */
|
|
119
119
|
async verifyPresentationLD(args, context) {
|
|
@@ -122,10 +122,10 @@ export class CredentialIssuerLD {
|
|
|
122
122
|
if (typeof now === 'number') {
|
|
123
123
|
now = new Date(now * 1000);
|
|
124
124
|
}
|
|
125
|
-
return this.ldCredentialModule.verifyPresentation(presentation, args.challenge, args.domain,
|
|
125
|
+
return this.ldCredentialModule.verifyPresentation(presentation, args.challenge, args.domain, { ...args, now }, context);
|
|
126
126
|
}
|
|
127
|
-
async findSigningKeyWithId(context, identifier, keyRef) {
|
|
128
|
-
const extendedKeys = await mapIdentifierKeysToDoc(identifier, 'assertionMethod', context);
|
|
127
|
+
async findSigningKeyWithId(context, identifier, keyRef, resolutionOptions) {
|
|
128
|
+
const extendedKeys = await mapIdentifierKeysToDoc(identifier, 'assertionMethod', context, resolutionOptions);
|
|
129
129
|
let supportedTypes = this.ldCredentialModule.ldSuiteLoader.getAllSignatureSuiteTypes();
|
|
130
130
|
let signingKey;
|
|
131
131
|
let verificationMethodId;
|
|
@@ -149,7 +149,7 @@ export class CredentialIssuerLD {
|
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
151
151
|
* Returns true if the key is supported by any of the installed LD Signature suites
|
|
152
|
-
* @param k - the key to
|
|
152
|
+
* @param k - the key to match
|
|
153
153
|
*
|
|
154
154
|
* @internal
|
|
155
155
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-handler.js","sourceRoot":"","sources":["../src/action-handler.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAEL,aAAa,EACb,SAAS,EACT,SAAS,EACT,4BAA4B,EAC5B,sBAAsB,EAEtB,mBAAmB,EAEnB,mBAAmB,GACpB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+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,QAAQ,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC;oBAAE,OAAO,KAAK,CAAA;gBACzF,MAAK;QACT,CAAC;QAED,0EAA0E;QAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAA;QAC5E,OAAO,MAAM;aACV,GAAG,CAAC,CAAC,KAAwB,EAAE,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aACrF,IAAI,CAAC,CAAC,eAAwB,EAAE,EAAE,CAAC,eAAe,CAAC,CAAA;IACxD,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-context-loader.js","sourceRoot":"","sources":["../src/ld-context-loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAyB,MAAM,eAAe,CAAA;AAGjE,MAAM,OAAO,eAAe;IACT,QAAQ,CAAuC;IAEhE,YAAY,OAA+D;QACzE,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE;YAC5C,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;YACnE,sEAAsE;YACtE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,GAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"ld-context-loader.js","sourceRoot":"","sources":["../src/ld-context-loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAyB,MAAM,eAAe,CAAA;AAGjE,MAAM,OAAO,eAAe;IACT,QAAQ,CAAuC;IAEhE,YAAY,OAA+D;QACzE,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE;YAC5C,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;YACnE,sEAAsE;YACtE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,GAAY,EAAE,CAAC;gBACxC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;YAC5B,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,WAAW,CAAA;IACjF,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAW;QACnB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,CAAC;CACF"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { CredentialPayload, IAgentContext, IKey, IResolver, PresentationPayload, VerifiableCredential, VerifiablePresentation } from '@veramo/core-types';
|
|
1
|
+
import { CredentialPayload, IAgentContext, IKey, IResolver, PresentationPayload, UsingResolutionOptions, VerifiableCredential, VerifiablePresentation } from '@veramo/core-types';
|
|
2
2
|
import { LdContextLoader } from './ld-context-loader.js';
|
|
3
3
|
import { LdSuiteLoader } from './ld-suite-loader.js';
|
|
4
4
|
import { RequiredAgentMethods } from './ld-suites.js';
|
|
5
|
+
type ForwardedOptions = UsingResolutionOptions & {
|
|
6
|
+
fetchRemoteContexts?: boolean;
|
|
7
|
+
now?: number;
|
|
8
|
+
};
|
|
5
9
|
export declare class LdCredentialModule {
|
|
6
10
|
/**
|
|
7
11
|
* TODO: General Implementation Notes
|
|
@@ -16,10 +20,11 @@ export declare class LdCredentialModule {
|
|
|
16
20
|
ldContextLoader: LdContextLoader;
|
|
17
21
|
ldSuiteLoader: LdSuiteLoader;
|
|
18
22
|
});
|
|
19
|
-
getDocumentLoader(context: IAgentContext<IResolver>,
|
|
20
|
-
issueLDVerifiableCredential(credential: CredentialPayload, issuerDid: string, key: IKey, verificationMethodId: string, options:
|
|
21
|
-
signLDVerifiablePresentation(presentation: PresentationPayload, holderDid: string, key: IKey, verificationMethodId: string, challenge: string | undefined, domain: string | undefined, options:
|
|
22
|
-
verifyCredential(credential: VerifiableCredential,
|
|
23
|
-
verifyPresentation(presentation: VerifiablePresentation, challenge: string | undefined, domain: string | undefined,
|
|
23
|
+
getDocumentLoader(context: IAgentContext<IResolver>, options?: ForwardedOptions): any;
|
|
24
|
+
issueLDVerifiableCredential(credential: CredentialPayload, issuerDid: string, key: IKey, verificationMethodId: string, options: ForwardedOptions, context: IAgentContext<RequiredAgentMethods>): Promise<VerifiableCredential>;
|
|
25
|
+
signLDVerifiablePresentation(presentation: PresentationPayload, holderDid: string, key: IKey, verificationMethodId: string, challenge: string | undefined, domain: string | undefined, options: ForwardedOptions, context: IAgentContext<RequiredAgentMethods>): Promise<VerifiablePresentation>;
|
|
26
|
+
verifyCredential(credential: VerifiableCredential, options: ForwardedOptions, context: IAgentContext<IResolver>): Promise<boolean>;
|
|
27
|
+
verifyPresentation(presentation: VerifiablePresentation, challenge: string | undefined, domain: string | undefined, options: ForwardedOptions, context: IAgentContext<IResolver>): Promise<boolean>;
|
|
24
28
|
}
|
|
29
|
+
export {};
|
|
25
30
|
//# sourceMappingURL=ld-credential-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-credential-module.d.ts","sourceRoot":"","sources":["../src/ld-credential-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,IAAI,EACJ,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EAC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zE,2BAA2B,CAC/B,UAAU,EAAE,iBAAiB,EAC7B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,IAAI,EACT,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,OAAO,CAAC,oBAAoB,CAAC;IAoB1B,4BAA4B,CAChC,YAAY,EAAE,mBAAmB,EACjC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,IAAI,EACT,oBAAoB,EAAE,MAAM,EAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC3C,OAAO,CAAC,sBAAsB,CAAC;IAqB5B,gBAAgB,CACpB,UAAU,EAAE,oBAAoB,EAChC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC;IAmBb,kBAAkB,CACtB,YAAY,EAAE,sBAAsB,EACpC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC;CAkBpB"}
|
|
@@ -18,12 +18,13 @@ export class LdCredentialModule {
|
|
|
18
18
|
this.ldContextLoader = options.ldContextLoader;
|
|
19
19
|
this.ldSuiteLoader = options.ldSuiteLoader;
|
|
20
20
|
}
|
|
21
|
-
getDocumentLoader(context,
|
|
21
|
+
getDocumentLoader(context, options) {
|
|
22
22
|
return extendContextLoader(async (url) => {
|
|
23
|
-
|
|
23
|
+
const resolutionOptions = { accept: 'application/did+ld+json', ...options?.resolutionOptions };
|
|
24
|
+
const attemptToFetchContexts = options?.fetchRemoteContexts ?? false;
|
|
24
25
|
// did resolution
|
|
25
26
|
if (url.toLowerCase().startsWith('did:')) {
|
|
26
|
-
const resolutionResult = await context.agent.resolveDid({ didUrl: url });
|
|
27
|
+
const resolutionResult = await context.agent.resolveDid({ didUrl: url, options: resolutionOptions });
|
|
27
28
|
const didDoc = resolutionResult.didDocument;
|
|
28
29
|
if (!didDoc)
|
|
29
30
|
return;
|
|
@@ -79,7 +80,7 @@ export class LdCredentialModule {
|
|
|
79
80
|
async issueLDVerifiableCredential(credential, issuerDid, key, verificationMethodId, options, context) {
|
|
80
81
|
// TODO: try multiple matching suites until one works or list is exhausted
|
|
81
82
|
const suite = this.ldSuiteLoader.getSignatureSuiteForKeyType(key.type, key.meta?.verificationMethod?.type ?? '')[0];
|
|
82
|
-
const documentLoader = this.getDocumentLoader(context, options
|
|
83
|
+
const documentLoader = this.getDocumentLoader(context, options);
|
|
83
84
|
// some suites can modify the incoming credential (e.g. add required contexts)
|
|
84
85
|
suite.preSigningCredModification(credential);
|
|
85
86
|
return await vc.issue({
|
|
@@ -93,7 +94,7 @@ export class LdCredentialModule {
|
|
|
93
94
|
async signLDVerifiablePresentation(presentation, holderDid, key, verificationMethodId, challenge, domain, options, context) {
|
|
94
95
|
// TODO: try multiple matching suites until one works or list is exhausted
|
|
95
96
|
const suite = this.ldSuiteLoader.getSignatureSuiteForKeyType(key.type, key.meta?.verificationMethod?.type ?? '')[0];
|
|
96
|
-
const documentLoader = this.getDocumentLoader(context, options
|
|
97
|
+
const documentLoader = this.getDocumentLoader(context, options);
|
|
97
98
|
suite.preSigningPresModification(presentation);
|
|
98
99
|
return await vc.signPresentation({
|
|
99
100
|
...options,
|
|
@@ -105,12 +106,13 @@ export class LdCredentialModule {
|
|
|
105
106
|
compactProof: false,
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
|
-
async verifyCredential(credential,
|
|
109
|
+
async verifyCredential(credential, options, context) {
|
|
110
|
+
const fetchRemoteContexts = options.fetchRemoteContexts ?? false;
|
|
109
111
|
const result = await vc.verifyCredential({
|
|
110
112
|
...options,
|
|
111
113
|
credential,
|
|
112
114
|
suite: this.ldSuiteLoader.getAllSignatureSuites().map((x) => x.getSuiteForVerification()),
|
|
113
|
-
documentLoader: this.getDocumentLoader(context, fetchRemoteContexts),
|
|
115
|
+
documentLoader: this.getDocumentLoader(context, { ...options, fetchRemoteContexts }),
|
|
114
116
|
compactProof: false,
|
|
115
117
|
checkStatus: async () => Promise.resolve({ verified: true }), // Fake method
|
|
116
118
|
});
|
|
@@ -120,12 +122,13 @@ export class LdCredentialModule {
|
|
|
120
122
|
}
|
|
121
123
|
return result;
|
|
122
124
|
}
|
|
123
|
-
async verifyPresentation(presentation, challenge, domain,
|
|
125
|
+
async verifyPresentation(presentation, challenge, domain, options, context) {
|
|
126
|
+
const fetchRemoteContexts = options.fetchRemoteContexts ?? false;
|
|
124
127
|
const result = await vc.verify({
|
|
125
128
|
...options,
|
|
126
129
|
presentation,
|
|
127
130
|
suite: this.ldSuiteLoader.getAllSignatureSuites().map((x) => x.getSuiteForVerification()),
|
|
128
|
-
documentLoader: this.getDocumentLoader(context, fetchRemoteContexts),
|
|
131
|
+
documentLoader: this.getDocumentLoader(context, { ...options, fetchRemoteContexts }),
|
|
129
132
|
challenge,
|
|
130
133
|
domain,
|
|
131
134
|
compactProof: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-credential-module.js","sourceRoot":"","sources":["../src/ld-credential-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ld-credential-module.js","sourceRoot":"","sources":["../src/ld-credential-module.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,gBAAgB,MAAM,uCAAuC,CAAA;AAEpE,MAAM,EAAE,mBAAmB,EAAE,GAAG,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAK5C,MAAM,KAAK,GAA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iBAAiB,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,mBAAmB,EAAE,CAAC;YACpF,SAAS;YACT,MAAM;YACN,YAAY,EAAE,KAAK;SACpB,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,+BAA+B;YAC/B,KAAK,CAAC,oCAAoC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;QAC9E,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
|
|
@@ -28,7 +28,7 @@ export const LdDefaultContexts = new Map([
|
|
|
28
28
|
['https://www.w3.org/2018/credentials/v1', contextCredentialV1],
|
|
29
29
|
['https://www.w3.org/2018/credentials/examples/v1', contextCredentialExamplesV1],
|
|
30
30
|
['https://www.w3.org/ns/did/v1', contextDidV1],
|
|
31
|
-
['https://w3id.org/did/v1', contextDidV1],
|
|
31
|
+
['https://w3id.org/did/v1', contextDidV1], //legacy
|
|
32
32
|
['https://w3id.org/security/v1', contextSecurityV1],
|
|
33
33
|
['https://w3id.org/security/v2', contextSecurityV2],
|
|
34
34
|
['https://w3id.org/security/v3-unstable', contextSecurityV3],
|
|
@@ -40,7 +40,7 @@ export const LdDefaultContexts = new Map([
|
|
|
40
40
|
['https://w3id.org/security/suites/jws-2020/v1', contextSuitesJws_2020],
|
|
41
41
|
['https://veramo.io/contexts/profile/v1', contextVeramoProfile],
|
|
42
42
|
[
|
|
43
|
-
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
|
|
43
|
+
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', //legacy
|
|
44
44
|
contextLdsEcdsaSecpRecovery2020_0,
|
|
45
45
|
],
|
|
46
46
|
[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-default-contexts.js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G,EAAE,QAAQ;QACvH,iCAAiC;KAClC;IACD;QACE,6GAA6G;QAC7G,kCAAkC;KACnC;IACD,CAAC,4DAA4D,EAAE,kCAAkC,CAAC;IAClG,CAAC,iDAAiD,EAAE,kBAAkB,CAAC;IACvE,CAAC,gEAAgE,EAAE,kBAAkB,CAAC;IACtF,CAAC,oDAAoD,EAAE,kBAAkB,CAAC;IAC1E,CAAC,oBAAoB,EAAE,UAAU,CAAC;CACnC,CAAC,CAAA"}
|
package/build/ld-suites.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ld-suites.js","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,MAAM,OAAgB,iBAAiB;IAuBrC,0BAA0B,CAAC,YAAiC;QAC1D,mGAAmG;QACnG,gEAAgE;QAChE,MAAM,qBAAqB,GAAG,YAAmB,CAAA;QACjD,IAAI,qBAAqB,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"ld-suites.js","sourceRoot":"","sources":["../src/ld-suites.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,MAAM,OAAgB,iBAAiB;IAuBrC,0BAA0B,CAAC,YAAiC;QAC1D,mGAAmG;QACnG,gEAAgE;QAChE,MAAM,qBAAqB,GAAG,YAAmB,CAAA;QACjD,IAAI,qBAAqB,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,EAAE,CAAC;YACjD,OAAO,qBAAqB,CAAC,QAAQ,CAAA;QACvC,CAAC;IACH,CAAC;CACF"}
|
package/build/plugin.schema.d.ts
CHANGED
|
@@ -5,6 +5,18 @@ export declare const schema: {
|
|
|
5
5
|
ICreateVerifiableCredentialLDArgs: {
|
|
6
6
|
type: string;
|
|
7
7
|
properties: {
|
|
8
|
+
resolutionOptions: {
|
|
9
|
+
type: string;
|
|
10
|
+
properties: {
|
|
11
|
+
publicKeyFormat: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
accept: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
8
20
|
credential: {
|
|
9
21
|
$ref: string;
|
|
10
22
|
description: string;
|
|
@@ -168,6 +180,18 @@ export declare const schema: {
|
|
|
168
180
|
ICreateVerifiablePresentationLDArgs: {
|
|
169
181
|
type: string;
|
|
170
182
|
properties: {
|
|
183
|
+
resolutionOptions: {
|
|
184
|
+
type: string;
|
|
185
|
+
properties: {
|
|
186
|
+
publicKeyFormat: {
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
accept: {
|
|
190
|
+
type: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
description: string;
|
|
194
|
+
};
|
|
171
195
|
presentation: {
|
|
172
196
|
$ref: string;
|
|
173
197
|
description: string;
|
|
@@ -296,6 +320,18 @@ export declare const schema: {
|
|
|
296
320
|
IVerifyCredentialLDArgs: {
|
|
297
321
|
type: string;
|
|
298
322
|
properties: {
|
|
323
|
+
resolutionOptions: {
|
|
324
|
+
type: string;
|
|
325
|
+
properties: {
|
|
326
|
+
publicKeyFormat: {
|
|
327
|
+
type: string;
|
|
328
|
+
};
|
|
329
|
+
accept: {
|
|
330
|
+
type: string;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
description: string;
|
|
334
|
+
};
|
|
299
335
|
credential: {
|
|
300
336
|
$ref: string;
|
|
301
337
|
description: string;
|
|
@@ -314,6 +350,18 @@ export declare const schema: {
|
|
|
314
350
|
IVerifyPresentationLDArgs: {
|
|
315
351
|
type: string;
|
|
316
352
|
properties: {
|
|
353
|
+
resolutionOptions: {
|
|
354
|
+
type: string;
|
|
355
|
+
properties: {
|
|
356
|
+
publicKeyFormat: {
|
|
357
|
+
type: string;
|
|
358
|
+
};
|
|
359
|
+
accept: {
|
|
360
|
+
type: string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
description: string;
|
|
364
|
+
};
|
|
317
365
|
presentation: {
|
|
318
366
|
$ref: string;
|
|
319
367
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.schema.d.ts","sourceRoot":"","sources":["../src/plugin.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"plugin.schema.d.ts","sourceRoot":"","sources":["../src/plugin.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2dlB,CAAA"}
|
package/build/plugin.schema.js
CHANGED
|
@@ -5,9 +5,21 @@ export const schema = {
|
|
|
5
5
|
"ICreateVerifiableCredentialLDArgs": {
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
+
"resolutionOptions": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"publicKeyFormat": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"accept": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"description": "Options to be passed to the DID resolver."
|
|
19
|
+
},
|
|
8
20
|
"credential": {
|
|
9
21
|
"$ref": "#/components/schemas/CredentialPayload",
|
|
10
|
-
"description": "The json payload of the Credential according to the
|
|
22
|
+
"description": "The json payload of the Credential according to the {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`\n\n`@context`, `type` and `issuanceDate` will be added automatically if omitted"
|
|
11
23
|
},
|
|
12
24
|
"keyRef": {
|
|
13
25
|
"type": "string",
|
|
@@ -24,7 +36,7 @@ export const schema = {
|
|
|
24
36
|
"additionalProperties": {
|
|
25
37
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
26
38
|
},
|
|
27
|
-
"description": "Encapsulates the parameters required to create a
|
|
39
|
+
"description": "Encapsulates the parameters required to create a {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }"
|
|
28
40
|
},
|
|
29
41
|
"CredentialPayload": {
|
|
30
42
|
"type": "object",
|
|
@@ -79,7 +91,7 @@ export const schema = {
|
|
|
79
91
|
"type": "string"
|
|
80
92
|
}
|
|
81
93
|
],
|
|
82
|
-
"description": "The issuer of a {@link VerifiableCredential } or the holder of a {@link VerifiablePresentation } .\n\nThe value of the issuer property MUST be either a URI or an object containing an id property. It is RECOMMENDED that the URI in the issuer or its id be one which, if de-referenced, results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.\n\nSee {@link
|
|
94
|
+
"description": "The issuer of a {@link VerifiableCredential } or the holder of a {@link VerifiablePresentation } .\n\nThe value of the issuer property MUST be either a URI or an object containing an id property. It is RECOMMENDED that the URI in the issuer or its id be one which, if de-referenced, results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#issuer | Issuer data model }"
|
|
83
95
|
},
|
|
84
96
|
"CredentialSubject": {
|
|
85
97
|
"type": "object",
|
|
@@ -88,7 +100,7 @@ export const schema = {
|
|
|
88
100
|
"type": "string"
|
|
89
101
|
}
|
|
90
102
|
},
|
|
91
|
-
"description": "The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.\n\nSee {@link
|
|
103
|
+
"description": "The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#credential-subject | Credential Subject }"
|
|
92
104
|
},
|
|
93
105
|
"ContextType": {
|
|
94
106
|
"anyOf": [
|
|
@@ -132,7 +144,7 @@ export const schema = {
|
|
|
132
144
|
"id",
|
|
133
145
|
"type"
|
|
134
146
|
],
|
|
135
|
-
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link
|
|
147
|
+
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
|
|
136
148
|
},
|
|
137
149
|
"VerifiableCredential": {
|
|
138
150
|
"type": "object",
|
|
@@ -182,7 +194,7 @@ export const schema = {
|
|
|
182
194
|
"issuer",
|
|
183
195
|
"proof"
|
|
184
196
|
],
|
|
185
|
-
"description": "Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See {@link
|
|
197
|
+
"description": "Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model }"
|
|
186
198
|
},
|
|
187
199
|
"ProofType": {
|
|
188
200
|
"type": "object",
|
|
@@ -196,9 +208,21 @@ export const schema = {
|
|
|
196
208
|
"ICreateVerifiablePresentationLDArgs": {
|
|
197
209
|
"type": "object",
|
|
198
210
|
"properties": {
|
|
211
|
+
"resolutionOptions": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"publicKeyFormat": {
|
|
215
|
+
"type": "string"
|
|
216
|
+
},
|
|
217
|
+
"accept": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"description": "Options to be passed to the DID resolver."
|
|
222
|
+
},
|
|
199
223
|
"presentation": {
|
|
200
224
|
"$ref": "#/components/schemas/PresentationPayload",
|
|
201
|
-
"description": "The json payload of the Presentation according to the
|
|
225
|
+
"description": "The json payload of the Presentation according to the {@link https://www.w3.org/TR/vc-data-model/#presentations | canonical model } .\n\nThe signer of the Presentation is chosen based on the `holder` property of the `presentation`\n\n`@context`, `type` and `issuanceDate` will be added automatically if omitted."
|
|
202
226
|
},
|
|
203
227
|
"challenge": {
|
|
204
228
|
"type": "string",
|
|
@@ -223,7 +247,7 @@ export const schema = {
|
|
|
223
247
|
"additionalProperties": {
|
|
224
248
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
225
249
|
},
|
|
226
|
-
"description": "Encapsulates the parameters required to create a
|
|
250
|
+
"description": "Encapsulates the parameters required to create a {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }"
|
|
227
251
|
},
|
|
228
252
|
"PresentationPayload": {
|
|
229
253
|
"type": "object",
|
|
@@ -276,7 +300,7 @@ export const schema = {
|
|
|
276
300
|
"$ref": "#/components/schemas/CompactJWT"
|
|
277
301
|
}
|
|
278
302
|
],
|
|
279
|
-
"description": "Represents a signed Verifiable Credential (includes proof), in either JSON or compact JWT format. See {@link
|
|
303
|
+
"description": "Represents a signed Verifiable Credential (includes proof), in either JSON or compact JWT format. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }"
|
|
280
304
|
},
|
|
281
305
|
"CompactJWT": {
|
|
282
306
|
"type": "string",
|
|
@@ -334,14 +358,26 @@ export const schema = {
|
|
|
334
358
|
"holder",
|
|
335
359
|
"proof"
|
|
336
360
|
],
|
|
337
|
-
"description": "Represents a signed Verifiable Presentation (includes proof), using a JSON representation. See {@link
|
|
361
|
+
"description": "Represents a signed Verifiable Presentation (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#presentations | VP data model }"
|
|
338
362
|
},
|
|
339
363
|
"IVerifyCredentialLDArgs": {
|
|
340
364
|
"type": "object",
|
|
341
365
|
"properties": {
|
|
366
|
+
"resolutionOptions": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"properties": {
|
|
369
|
+
"publicKeyFormat": {
|
|
370
|
+
"type": "string"
|
|
371
|
+
},
|
|
372
|
+
"accept": {
|
|
373
|
+
"type": "string"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"description": "Options to be passed to the DID resolver."
|
|
377
|
+
},
|
|
342
378
|
"credential": {
|
|
343
379
|
"$ref": "#/components/schemas/VerifiableCredential",
|
|
344
|
-
"description": "The json payload of the Credential according to the
|
|
380
|
+
"description": "The json payload of the Credential according to the {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`"
|
|
345
381
|
},
|
|
346
382
|
"fetchRemoteContexts": {
|
|
347
383
|
"type": "boolean",
|
|
@@ -354,14 +390,26 @@ export const schema = {
|
|
|
354
390
|
"additionalProperties": {
|
|
355
391
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
356
392
|
},
|
|
357
|
-
"description": "Encapsulates the parameters required to verify a
|
|
393
|
+
"description": "Encapsulates the parameters required to verify a {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }"
|
|
358
394
|
},
|
|
359
395
|
"IVerifyPresentationLDArgs": {
|
|
360
396
|
"type": "object",
|
|
361
397
|
"properties": {
|
|
398
|
+
"resolutionOptions": {
|
|
399
|
+
"type": "object",
|
|
400
|
+
"properties": {
|
|
401
|
+
"publicKeyFormat": {
|
|
402
|
+
"type": "string"
|
|
403
|
+
},
|
|
404
|
+
"accept": {
|
|
405
|
+
"type": "string"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"description": "Options to be passed to the DID resolver."
|
|
409
|
+
},
|
|
362
410
|
"presentation": {
|
|
363
411
|
"$ref": "#/components/schemas/VerifiablePresentation",
|
|
364
|
-
"description": "The json payload of the Credential according to the
|
|
412
|
+
"description": "The json payload of the Credential according to the {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`"
|
|
365
413
|
},
|
|
366
414
|
"challenge": {
|
|
367
415
|
"type": "string",
|
|
@@ -382,7 +430,7 @@ export const schema = {
|
|
|
382
430
|
"additionalProperties": {
|
|
383
431
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
384
432
|
},
|
|
385
|
-
"description": "Encapsulates the parameters required to verify a
|
|
433
|
+
"description": "Encapsulates the parameters required to verify a {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }"
|
|
386
434
|
}
|
|
387
435
|
},
|
|
388
436
|
"methods": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.schema.js","sourceRoot":"","sources":["../src/plugin.schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,qBAAqB,EAAE;QACrB,YAAY,EAAE;YACZ,SAAS,EAAE;gBACT,mCAAmC,EAAE;oBACnC,MAAM,EAAE,QAAQ;oBAChB,YAAY,EAAE;wBACZ,YAAY,EAAE;4BACZ,MAAM,EAAE,wCAAwC;4BAChD,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.schema.js","sourceRoot":"","sources":["../src/plugin.schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,qBAAqB,EAAE;QACrB,YAAY,EAAE;YACZ,SAAS,EAAE;gBACT,mCAAmC,EAAE;oBACnC,MAAM,EAAE,QAAQ;oBAChB,YAAY,EAAE;wBACZ,mBAAmB,EAAE;4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AAW,EAAE;wBACX,MAAM,EAAE,0DAA0D;qBACnE;oBACD,YAAY,EAAE;wBACZ,MAAM,EAAE,6CAA6C;qBACtD;iBACF;gBACD,oBAAoB,EAAE;oBACpB,aAAa,EAAE,qDAAqD;oBACpE,WAAW,EAAE;wBACX,MAAM,EAAE,8CAA8C;qBACvD;oBACD,YAAY,EAAE;wBACZ,MAAM,EAAE,SAAS;qBAClB;iBACF;gBACD,sBAAsB,EAAE;oBACtB,aAAa,EAAE,uDAAuD;oBACtE,WAAW,EAAE;wBACX,MAAM,EAAE,gDAAgD;qBACzD;oBACD,YAAY,EAAE;wBACZ,MAAM,EAAE,SAAS;qBAClB;iBACF;aACF;SACF;KACF;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.js","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,QAAQ,MAAM,oDAAoD,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAE5G,MAAM,EAAE,gCAAgC,EAAE,mCAAmC,EAAE,GAAG,QAAQ,CAAA;AAE1F;;;;GAIG;AACH,MAAM,OAAO,yCAA0C,SAAQ,iBAAiB;IAC9E,4BAA4B;QAC1B,OAAO,kCAAkC,CAAA;QACzC,mGAAmG;QACnG,gCAAgC;IAClC,CAAC;IAED,yBAAyB;QACvB,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,kBAAkB,CAChB,GAAS,EACT,GAAW,EACX,kBAA0B,EAC1B,OAA4C;QAE5C,MAAM,UAAU,GAAG,GAAG,CAAA;QACtB,MAAM,MAAM,GAAG;YACb,wBAAwB;YACxB,IAAI,EAAE,KAAK,EAAE,IAA0B,EAAm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ClD,CAAC;IAED,0BAA0B,CAAC,UAA6B,IAAS,CAAC;IAElE,KAAK,CAAC,4BAA4B,CAAC,MAAc,EAAE,MAAmB;QACpE,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;QACvC,MAAM,aAAa,GACjB,6GAA6G,CAAA;QAC/G,MAAM,eAAe,GAAG,uCAAuC,CAAA;QAE/D,6DAA6D;QAC7D,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;QACtC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"EcdsaSecp256k1RecoverySignature2020.js","sourceRoot":"","sources":["../../src/suites/EcdsaSecp256k1RecoverySignature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,QAAQ,MAAM,oDAAoD,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAE5G,MAAM,EAAE,gCAAgC,EAAE,mCAAmC,EAAE,GAAG,QAAQ,CAAA;AAE1F;;;;GAIG;AACH,MAAM,OAAO,yCAA0C,SAAQ,iBAAiB;IAC9E,4BAA4B;QAC1B,OAAO,kCAAkC,CAAA;QACzC,mGAAmG;QACnG,gCAAgC;IAClC,CAAC;IAED,yBAAyB;QACvB,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,kBAAkB,CAChB,GAAS,EACT,GAAW,EACX,kBAA0B,EAC1B,OAA4C;QAE5C,MAAM,UAAU,GAAG,GAAG,CAAA;QACtB,MAAM,MAAM,GAAG;YACb,wBAAwB;YACxB,IAAI,EAAE,KAAK,EAAE,IAA0B,EAAmB,EAAE;gBAC1D,MAAM,MAAM,GAAG;oBACb,GAAG,EAAE,UAAU;oBACf,GAAG,EAAE,KAAK;oBACV,IA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AQ;oBAClB,SAAS,EAAE,OAAO;iBACnB,CAAC,CAAA;gBACF,OAAO,aAAa,CAAC,SAAS,CAAC,CAAA;YACjC,CAAC;SACF,CAAA;QAED,MAAM,eAAe,GAAG,IAAI,0BAA0B,CAAC;YACrD,EAAE;YACF,UAAU;YACV,kBAAkB,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,aAAa,CAAC;YAC9F,wBAAwB;YACxB,6CAA6C;SAC9C,CAAC,CAAA;QACF,+DAA+D;QAC/D,eAAe,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,MAAa,CAAA;QAC5C,eAAe,CAAC,IAAI,GAAG,4BAA4B,CAAA;QACnD,OAAO,IAAI,oBAAoB,CAAC;YAC9B,GAAG,EAAE,eAAe;YACpB,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;IACJ,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,oBAAoB,EAAE,CAAA;IACnC,CAAC;IAED,0BAA0B,CAAC,UAA6B;QACtD,qBAAqB;IACvB,CAAC;IAED,KAAK,CAAC,4BAA4B,CAChC,MAAc,EACd,GAAmD,EACnD,OAAiC;QAEjC,IAAI,QAAQ,GAAG,GAAG,CAAA;QAClB,yGAAyG;QACzG,IAAK,QAAwB,CAAC,kBAAkB,EAAE;
|
|
1
|
+
{"version":3,"file":"Ed25519Signature2020.js","sourceRoot":"","sources":["../../src/suites/Ed25519Signature2020.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAUzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAA;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAA;AAC9F,OAAO,EACL,OAAO,EACP,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,GACX,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,MAAM,OAAO,CA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CAAC;gBAChB,KAAK,CAAC,+DAA+D,MAAM,EAAE,CAAC,CAAA;YAChF,CAAC;QACH,CAAC;QAED,IAAK,QAA+B,CAAC,IAAI,KAAK,4BAA4B,EAAE,CAAC;YAC3E,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,QAA8B,CAAC,CAAA;QAC7E,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;IAEO,2BAA2B,CAAC,EAAsB;QACxD,IAAI,EAAE,CAAC,IAAI,KAAK,4BAA4B,EAAE,CAAC;YAC7C,CAAC;YAAC,EAAU,CAAC,UAAU,CAAC,GAAG,kDAAkD,CAAA;YAC7E,+CAA+C;YAC/C,IAAI,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAC;gBAC3B,MAAM,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAA;gBAChD,EAAE,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,aAAa,CAAC,CAAA;YAChG,CAAC;QACH,CAAC;QACD,OAAO,EAAE,CAAA;IACX,CAAC;CACF"}
|
package/build/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CredentialPayload, IAgentContext, IDIDManager, IKey, IKeyManager, IPluginMethodMap, IResolver, PresentationPayload, VerifiableCredential, VerifiablePresentation } from '@veramo/core-types';
|
|
1
|
+
import { CredentialPayload, IAgentContext, IDIDManager, IKey, IKeyManager, IPluginMethodMap, IResolver, PresentationPayload, UsingResolutionOptions, VerifiableCredential, VerifiablePresentation } from '@veramo/core-types';
|
|
2
2
|
/**
|
|
3
3
|
* The interface definition for a plugin that can issue and verify Verifiable Credentials and Presentations
|
|
4
4
|
* that use JSON-LD format (also called Data Integrity Proofs).
|
|
@@ -81,7 +81,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
81
81
|
*
|
|
82
82
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
83
83
|
*/
|
|
84
|
-
export interface ICreateVerifiablePresentationLDArgs {
|
|
84
|
+
export interface ICreateVerifiablePresentationLDArgs extends UsingResolutionOptions {
|
|
85
85
|
/**
|
|
86
86
|
* The json payload of the Presentation according to the
|
|
87
87
|
* {@link https://www.w3.org/TR/vc-data-model/#presentations | canonical model}.
|
|
@@ -121,7 +121,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
121
121
|
*
|
|
122
122
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
123
123
|
*/
|
|
124
|
-
export interface ICreateVerifiableCredentialLDArgs {
|
|
124
|
+
export interface ICreateVerifiableCredentialLDArgs extends UsingResolutionOptions {
|
|
125
125
|
/**
|
|
126
126
|
* The json payload of the Credential according to the
|
|
127
127
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model}
|
|
@@ -153,7 +153,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
153
153
|
*
|
|
154
154
|
* @beta This API may change without a BREAKING CHANGE notice
|
|
155
155
|
*/
|
|
156
|
-
export interface IVerifyCredentialLDArgs {
|
|
156
|
+
export interface IVerifyCredentialLDArgs extends UsingResolutionOptions {
|
|
157
157
|
/**
|
|
158
158
|
* The json payload of the Credential according to the
|
|
159
159
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model}
|
|
@@ -180,7 +180,7 @@ export interface IVerifyCredentialLDArgs {
|
|
|
180
180
|
*
|
|
181
181
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
182
182
|
*/
|
|
183
|
-
export interface IVerifyPresentationLDArgs {
|
|
183
|
+
export interface IVerifyPresentationLDArgs extends UsingResolutionOptions {
|
|
184
184
|
/**
|
|
185
185
|
* The json payload of the Credential according to the
|
|
186
186
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model}
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types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AIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAwB,SAAQ,sBAAsB;IACrE;;;;;;;OAOG;IACH,UAAU,EAAE,oBAAoB,CAAA;IAEhC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACvE;;;;;;;OAOG;IACH,YAAY,EAAE,sBAAsB,CAAA;IAEpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAC1C,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,gBAAgB,CAAC,CACvG,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAChC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veramo/credential-ld",
|
|
3
3
|
"description": "Veramo plugin for working with W3C JSON-LD Verifiable Credentials & Presentations.",
|
|
4
|
-
"version": "5.6.1-next.
|
|
4
|
+
"version": "5.6.1-next.53+49027de62",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./build/index.js"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.81",
|
|
27
27
|
"@transmute/json-web-signature": "^0.7.0-unstable.81",
|
|
28
28
|
"@veramo-community/lds-ecdsa-secp256k1-recovery2020": "uport-project/EcdsaSecp256k1RecoverySignature2020",
|
|
29
|
-
"@veramo/core-types": "^5.6.1-next.
|
|
30
|
-
"@veramo/utils": "^5.6.1-next.
|
|
29
|
+
"@veramo/core-types": "^5.6.1-next.53+49027de62",
|
|
30
|
+
"@veramo/utils": "^5.6.1-next.53+49027de62",
|
|
31
31
|
"cross-fetch": "^4.0.0",
|
|
32
32
|
"debug": "^4.3.3",
|
|
33
33
|
"did-resolver": "^4.1.0"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/debug": "4.1.8",
|
|
41
41
|
"borc": "3.0.0",
|
|
42
|
-
"typescript": "5.
|
|
42
|
+
"typescript": "5.3.3"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
45
|
"build/**/*",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"node_modules",
|
|
82
82
|
"src"
|
|
83
83
|
],
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "49027de62011266206ef52f7724d679b1469d9a1"
|
|
85
85
|
}
|
package/src/action-handler.ts
CHANGED
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
IVerifyCredentialLDArgs,
|
|
38
38
|
IVerifyPresentationLDArgs,
|
|
39
39
|
} from './types.js'
|
|
40
|
+
import { DIDResolutionOptions } from 'did-resolver'
|
|
40
41
|
|
|
41
42
|
const debug = Debug('veramo:credential-ld:action-handler')
|
|
42
43
|
|
|
@@ -114,6 +115,7 @@ export class CredentialIssuerLD implements IAgentPlugin {
|
|
|
114
115
|
context,
|
|
115
116
|
identifier,
|
|
116
117
|
args.keyRef,
|
|
118
|
+
args.resolutionOptions,
|
|
117
119
|
)
|
|
118
120
|
|
|
119
121
|
let { now } = args
|
|
@@ -169,6 +171,7 @@ export class CredentialIssuerLD implements IAgentPlugin {
|
|
|
169
171
|
context,
|
|
170
172
|
identifier,
|
|
171
173
|
args.keyRef,
|
|
174
|
+
args.resolutionOptions,
|
|
172
175
|
)
|
|
173
176
|
|
|
174
177
|
let { now } = args
|
|
@@ -202,12 +205,7 @@ export class CredentialIssuerLD implements IAgentPlugin {
|
|
|
202
205
|
now = new Date(now * 1000)
|
|
203
206
|
}
|
|
204
207
|
|
|
205
|
-
return this.ldCredentialModule.verifyCredential(
|
|
206
|
-
credential,
|
|
207
|
-
args.fetchRemoteContexts || false,
|
|
208
|
-
{ ...args, now },
|
|
209
|
-
context,
|
|
210
|
-
)
|
|
208
|
+
return this.ldCredentialModule.verifyCredential(credential, { ...args, now }, context)
|
|
211
209
|
}
|
|
212
210
|
|
|
213
211
|
/** {@inheritdoc ICredentialIssuerLD.verifyPresentationLD} */
|
|
@@ -224,7 +222,6 @@ export class CredentialIssuerLD implements IAgentPlugin {
|
|
|
224
222
|
presentation,
|
|
225
223
|
args.challenge,
|
|
226
224
|
args.domain,
|
|
227
|
-
args.fetchRemoteContexts || false,
|
|
228
225
|
{ ...args, now },
|
|
229
226
|
context,
|
|
230
227
|
)
|
|
@@ -234,8 +231,14 @@ export class CredentialIssuerLD implements IAgentPlugin {
|
|
|
234
231
|
context: IAgentContext<IResolver>,
|
|
235
232
|
identifier: IIdentifier,
|
|
236
233
|
keyRef?: string,
|
|
234
|
+
resolutionOptions?: DIDResolutionOptions,
|
|
237
235
|
): Promise<{ signingKey: _ExtendedIKey; verificationMethodId: string }> {
|
|
238
|
-
const extendedKeys: _ExtendedIKey[] = await mapIdentifierKeysToDoc(
|
|
236
|
+
const extendedKeys: _ExtendedIKey[] = await mapIdentifierKeysToDoc(
|
|
237
|
+
identifier,
|
|
238
|
+
'assertionMethod',
|
|
239
|
+
context,
|
|
240
|
+
resolutionOptions,
|
|
241
|
+
)
|
|
239
242
|
let supportedTypes = this.ldCredentialModule.ldSuiteLoader.getAllSignatureSuiteTypes()
|
|
240
243
|
let signingKey: _ExtendedIKey | undefined
|
|
241
244
|
let verificationMethodId: string
|
|
@@ -264,7 +267,7 @@ export class CredentialIssuerLD implements IAgentPlugin {
|
|
|
264
267
|
|
|
265
268
|
/**
|
|
266
269
|
* Returns true if the key is supported by any of the installed LD Signature suites
|
|
267
|
-
* @param k - the key to
|
|
270
|
+
* @param k - the key to match
|
|
268
271
|
*
|
|
269
272
|
* @internal
|
|
270
273
|
*/
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
IKey,
|
|
5
5
|
IResolver,
|
|
6
6
|
PresentationPayload,
|
|
7
|
+
UsingResolutionOptions,
|
|
7
8
|
VerifiableCredential,
|
|
8
9
|
VerifiablePresentation,
|
|
9
10
|
} from '@veramo/core-types'
|
|
@@ -19,6 +20,11 @@ import { RequiredAgentMethods } from './ld-suites.js'
|
|
|
19
20
|
|
|
20
21
|
const debug = Debug('veramo:w3c:ld-credential-module')
|
|
21
22
|
|
|
23
|
+
type ForwardedOptions = UsingResolutionOptions & {
|
|
24
|
+
fetchRemoteContexts?: boolean // defaults to false
|
|
25
|
+
now?: number // defaults to Date.now()
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
export class LdCredentialModule {
|
|
23
29
|
/**
|
|
24
30
|
* TODO: General Implementation Notes
|
|
@@ -36,13 +42,14 @@ export class LdCredentialModule {
|
|
|
36
42
|
this.ldSuiteLoader = options.ldSuiteLoader
|
|
37
43
|
}
|
|
38
44
|
|
|
39
|
-
getDocumentLoader(context: IAgentContext<IResolver>,
|
|
45
|
+
getDocumentLoader(context: IAgentContext<IResolver>, options?: ForwardedOptions) {
|
|
40
46
|
return extendContextLoader(async (url: string) => {
|
|
41
|
-
|
|
47
|
+
const resolutionOptions = { accept: 'application/did+ld+json', ...options?.resolutionOptions }
|
|
48
|
+
const attemptToFetchContexts = options?.fetchRemoteContexts ?? false
|
|
42
49
|
|
|
43
50
|
// did resolution
|
|
44
51
|
if (url.toLowerCase().startsWith('did:')) {
|
|
45
|
-
const resolutionResult = await context.agent.resolveDid({ didUrl: url })
|
|
52
|
+
const resolutionResult = await context.agent.resolveDid({ didUrl: url, options: resolutionOptions })
|
|
46
53
|
const didDoc = resolutionResult.didDocument
|
|
47
54
|
|
|
48
55
|
if (!didDoc) return
|
|
@@ -107,7 +114,7 @@ export class LdCredentialModule {
|
|
|
107
114
|
issuerDid: string,
|
|
108
115
|
key: IKey,
|
|
109
116
|
verificationMethodId: string,
|
|
110
|
-
options:
|
|
117
|
+
options: ForwardedOptions,
|
|
111
118
|
context: IAgentContext<RequiredAgentMethods>,
|
|
112
119
|
): Promise<VerifiableCredential> {
|
|
113
120
|
// TODO: try multiple matching suites until one works or list is exhausted
|
|
@@ -115,7 +122,7 @@ export class LdCredentialModule {
|
|
|
115
122
|
key.type,
|
|
116
123
|
key.meta?.verificationMethod?.type ?? '',
|
|
117
124
|
)[0]
|
|
118
|
-
const documentLoader = this.getDocumentLoader(context, options
|
|
125
|
+
const documentLoader = this.getDocumentLoader(context, options)
|
|
119
126
|
|
|
120
127
|
// some suites can modify the incoming credential (e.g. add required contexts)
|
|
121
128
|
suite.preSigningCredModification(credential)
|
|
@@ -136,7 +143,7 @@ export class LdCredentialModule {
|
|
|
136
143
|
verificationMethodId: string,
|
|
137
144
|
challenge: string | undefined,
|
|
138
145
|
domain: string | undefined,
|
|
139
|
-
options:
|
|
146
|
+
options: ForwardedOptions,
|
|
140
147
|
context: IAgentContext<RequiredAgentMethods>,
|
|
141
148
|
): Promise<VerifiablePresentation> {
|
|
142
149
|
// TODO: try multiple matching suites until one works or list is exhausted
|
|
@@ -144,7 +151,7 @@ export class LdCredentialModule {
|
|
|
144
151
|
key.type,
|
|
145
152
|
key.meta?.verificationMethod?.type ?? '',
|
|
146
153
|
)[0]
|
|
147
|
-
const documentLoader = this.getDocumentLoader(context, options
|
|
154
|
+
const documentLoader = this.getDocumentLoader(context, options)
|
|
148
155
|
|
|
149
156
|
suite.preSigningPresModification(presentation)
|
|
150
157
|
|
|
@@ -161,15 +168,15 @@ export class LdCredentialModule {
|
|
|
161
168
|
|
|
162
169
|
async verifyCredential(
|
|
163
170
|
credential: VerifiableCredential,
|
|
164
|
-
|
|
165
|
-
options: any,
|
|
171
|
+
options: ForwardedOptions,
|
|
166
172
|
context: IAgentContext<IResolver>,
|
|
167
173
|
): Promise<boolean> {
|
|
174
|
+
const fetchRemoteContexts = options.fetchRemoteContexts ?? false
|
|
168
175
|
const result = await vc.verifyCredential({
|
|
169
176
|
...options,
|
|
170
177
|
credential,
|
|
171
178
|
suite: this.ldSuiteLoader.getAllSignatureSuites().map((x) => x.getSuiteForVerification()),
|
|
172
|
-
documentLoader: this.getDocumentLoader(context, fetchRemoteContexts),
|
|
179
|
+
documentLoader: this.getDocumentLoader(context, { ...options, fetchRemoteContexts }),
|
|
173
180
|
compactProof: false,
|
|
174
181
|
checkStatus: async () => Promise.resolve({ verified: true }), // Fake method
|
|
175
182
|
})
|
|
@@ -186,15 +193,15 @@ export class LdCredentialModule {
|
|
|
186
193
|
presentation: VerifiablePresentation,
|
|
187
194
|
challenge: string | undefined,
|
|
188
195
|
domain: string | undefined,
|
|
189
|
-
|
|
190
|
-
options: any,
|
|
196
|
+
options: ForwardedOptions,
|
|
191
197
|
context: IAgentContext<IResolver>,
|
|
192
198
|
): Promise<boolean> {
|
|
199
|
+
const fetchRemoteContexts = options.fetchRemoteContexts ?? false
|
|
193
200
|
const result = await vc.verify({
|
|
194
201
|
...options,
|
|
195
202
|
presentation,
|
|
196
203
|
suite: this.ldSuiteLoader.getAllSignatureSuites().map((x) => x.getSuiteForVerification()),
|
|
197
|
-
documentLoader: this.getDocumentLoader(context, fetchRemoteContexts),
|
|
204
|
+
documentLoader: this.getDocumentLoader(context, { ...options, fetchRemoteContexts }),
|
|
198
205
|
challenge,
|
|
199
206
|
domain,
|
|
200
207
|
compactProof: false,
|
package/src/plugin.schema.ts
CHANGED
|
@@ -5,9 +5,21 @@ export const schema = {
|
|
|
5
5
|
"ICreateVerifiableCredentialLDArgs": {
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
+
"resolutionOptions": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"publicKeyFormat": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"accept": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"description": "Options to be passed to the DID resolver."
|
|
19
|
+
},
|
|
8
20
|
"credential": {
|
|
9
21
|
"$ref": "#/components/schemas/CredentialPayload",
|
|
10
|
-
"description": "The json payload of the Credential according to the
|
|
22
|
+
"description": "The json payload of the Credential according to the {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`\n\n`@context`, `type` and `issuanceDate` will be added automatically if omitted"
|
|
11
23
|
},
|
|
12
24
|
"keyRef": {
|
|
13
25
|
"type": "string",
|
|
@@ -24,7 +36,7 @@ export const schema = {
|
|
|
24
36
|
"additionalProperties": {
|
|
25
37
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
26
38
|
},
|
|
27
|
-
"description": "Encapsulates the parameters required to create a
|
|
39
|
+
"description": "Encapsulates the parameters required to create a {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }"
|
|
28
40
|
},
|
|
29
41
|
"CredentialPayload": {
|
|
30
42
|
"type": "object",
|
|
@@ -79,7 +91,7 @@ export const schema = {
|
|
|
79
91
|
"type": "string"
|
|
80
92
|
}
|
|
81
93
|
],
|
|
82
|
-
"description": "The issuer of a {@link VerifiableCredential } or the holder of a {@link VerifiablePresentation } .\n\nThe value of the issuer property MUST be either a URI or an object containing an id property. It is RECOMMENDED that the URI in the issuer or its id be one which, if de-referenced, results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.\n\nSee {@link
|
|
94
|
+
"description": "The issuer of a {@link VerifiableCredential } or the holder of a {@link VerifiablePresentation } .\n\nThe value of the issuer property MUST be either a URI or an object containing an id property. It is RECOMMENDED that the URI in the issuer or its id be one which, if de-referenced, results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#issuer | Issuer data model }"
|
|
83
95
|
},
|
|
84
96
|
"CredentialSubject": {
|
|
85
97
|
"type": "object",
|
|
@@ -88,7 +100,7 @@ export const schema = {
|
|
|
88
100
|
"type": "string"
|
|
89
101
|
}
|
|
90
102
|
},
|
|
91
|
-
"description": "The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.\n\nSee {@link
|
|
103
|
+
"description": "The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#credential-subject | Credential Subject }"
|
|
92
104
|
},
|
|
93
105
|
"ContextType": {
|
|
94
106
|
"anyOf": [
|
|
@@ -132,7 +144,7 @@ export const schema = {
|
|
|
132
144
|
"id",
|
|
133
145
|
"type"
|
|
134
146
|
],
|
|
135
|
-
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link
|
|
147
|
+
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
|
|
136
148
|
},
|
|
137
149
|
"VerifiableCredential": {
|
|
138
150
|
"type": "object",
|
|
@@ -182,7 +194,7 @@ export const schema = {
|
|
|
182
194
|
"issuer",
|
|
183
195
|
"proof"
|
|
184
196
|
],
|
|
185
|
-
"description": "Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See {@link
|
|
197
|
+
"description": "Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model }"
|
|
186
198
|
},
|
|
187
199
|
"ProofType": {
|
|
188
200
|
"type": "object",
|
|
@@ -196,9 +208,21 @@ export const schema = {
|
|
|
196
208
|
"ICreateVerifiablePresentationLDArgs": {
|
|
197
209
|
"type": "object",
|
|
198
210
|
"properties": {
|
|
211
|
+
"resolutionOptions": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"publicKeyFormat": {
|
|
215
|
+
"type": "string"
|
|
216
|
+
},
|
|
217
|
+
"accept": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"description": "Options to be passed to the DID resolver."
|
|
222
|
+
},
|
|
199
223
|
"presentation": {
|
|
200
224
|
"$ref": "#/components/schemas/PresentationPayload",
|
|
201
|
-
"description": "The json payload of the Presentation according to the
|
|
225
|
+
"description": "The json payload of the Presentation according to the {@link https://www.w3.org/TR/vc-data-model/#presentations | canonical model } .\n\nThe signer of the Presentation is chosen based on the `holder` property of the `presentation`\n\n`@context`, `type` and `issuanceDate` will be added automatically if omitted."
|
|
202
226
|
},
|
|
203
227
|
"challenge": {
|
|
204
228
|
"type": "string",
|
|
@@ -223,7 +247,7 @@ export const schema = {
|
|
|
223
247
|
"additionalProperties": {
|
|
224
248
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
225
249
|
},
|
|
226
|
-
"description": "Encapsulates the parameters required to create a
|
|
250
|
+
"description": "Encapsulates the parameters required to create a {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }"
|
|
227
251
|
},
|
|
228
252
|
"PresentationPayload": {
|
|
229
253
|
"type": "object",
|
|
@@ -276,7 +300,7 @@ export const schema = {
|
|
|
276
300
|
"$ref": "#/components/schemas/CompactJWT"
|
|
277
301
|
}
|
|
278
302
|
],
|
|
279
|
-
"description": "Represents a signed Verifiable Credential (includes proof), in either JSON or compact JWT format. See {@link
|
|
303
|
+
"description": "Represents a signed Verifiable Credential (includes proof), in either JSON or compact JWT format. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }"
|
|
280
304
|
},
|
|
281
305
|
"CompactJWT": {
|
|
282
306
|
"type": "string",
|
|
@@ -334,14 +358,26 @@ export const schema = {
|
|
|
334
358
|
"holder",
|
|
335
359
|
"proof"
|
|
336
360
|
],
|
|
337
|
-
"description": "Represents a signed Verifiable Presentation (includes proof), using a JSON representation. See {@link
|
|
361
|
+
"description": "Represents a signed Verifiable Presentation (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#presentations | VP data model }"
|
|
338
362
|
},
|
|
339
363
|
"IVerifyCredentialLDArgs": {
|
|
340
364
|
"type": "object",
|
|
341
365
|
"properties": {
|
|
366
|
+
"resolutionOptions": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"properties": {
|
|
369
|
+
"publicKeyFormat": {
|
|
370
|
+
"type": "string"
|
|
371
|
+
},
|
|
372
|
+
"accept": {
|
|
373
|
+
"type": "string"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"description": "Options to be passed to the DID resolver."
|
|
377
|
+
},
|
|
342
378
|
"credential": {
|
|
343
379
|
"$ref": "#/components/schemas/VerifiableCredential",
|
|
344
|
-
"description": "The json payload of the Credential according to the
|
|
380
|
+
"description": "The json payload of the Credential according to the {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`"
|
|
345
381
|
},
|
|
346
382
|
"fetchRemoteContexts": {
|
|
347
383
|
"type": "boolean",
|
|
@@ -354,14 +390,26 @@ export const schema = {
|
|
|
354
390
|
"additionalProperties": {
|
|
355
391
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
356
392
|
},
|
|
357
|
-
"description": "Encapsulates the parameters required to verify a
|
|
393
|
+
"description": "Encapsulates the parameters required to verify a {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }"
|
|
358
394
|
},
|
|
359
395
|
"IVerifyPresentationLDArgs": {
|
|
360
396
|
"type": "object",
|
|
361
397
|
"properties": {
|
|
398
|
+
"resolutionOptions": {
|
|
399
|
+
"type": "object",
|
|
400
|
+
"properties": {
|
|
401
|
+
"publicKeyFormat": {
|
|
402
|
+
"type": "string"
|
|
403
|
+
},
|
|
404
|
+
"accept": {
|
|
405
|
+
"type": "string"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"description": "Options to be passed to the DID resolver."
|
|
409
|
+
},
|
|
362
410
|
"presentation": {
|
|
363
411
|
"$ref": "#/components/schemas/VerifiablePresentation",
|
|
364
|
-
"description": "The json payload of the Credential according to the
|
|
412
|
+
"description": "The json payload of the Credential according to the {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`"
|
|
365
413
|
},
|
|
366
414
|
"challenge": {
|
|
367
415
|
"type": "string",
|
|
@@ -382,7 +430,7 @@ export const schema = {
|
|
|
382
430
|
"additionalProperties": {
|
|
383
431
|
"description": "Any other options that can be forwarded to the lower level libraries"
|
|
384
432
|
},
|
|
385
|
-
"description": "Encapsulates the parameters required to verify a
|
|
433
|
+
"description": "Encapsulates the parameters required to verify a {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Verifiable Presentation }"
|
|
386
434
|
}
|
|
387
435
|
},
|
|
388
436
|
"methods": {
|
package/src/types.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
IPluginMethodMap,
|
|
8
8
|
IResolver,
|
|
9
9
|
PresentationPayload,
|
|
10
|
+
UsingResolutionOptions,
|
|
10
11
|
VerifiableCredential,
|
|
11
12
|
VerifiablePresentation,
|
|
12
13
|
} from '@veramo/core-types'
|
|
@@ -104,7 +105,7 @@ export interface ICredentialIssuerLD extends IPluginMethodMap {
|
|
|
104
105
|
*
|
|
105
106
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
106
107
|
*/
|
|
107
|
-
export interface ICreateVerifiablePresentationLDArgs {
|
|
108
|
+
export interface ICreateVerifiablePresentationLDArgs extends UsingResolutionOptions {
|
|
108
109
|
/**
|
|
109
110
|
* The json payload of the Presentation according to the
|
|
110
111
|
* {@link https://www.w3.org/TR/vc-data-model/#presentations | canonical model}.
|
|
@@ -150,7 +151,7 @@ export interface ICreateVerifiablePresentationLDArgs {
|
|
|
150
151
|
*
|
|
151
152
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
152
153
|
*/
|
|
153
|
-
export interface ICreateVerifiableCredentialLDArgs {
|
|
154
|
+
export interface ICreateVerifiableCredentialLDArgs extends UsingResolutionOptions {
|
|
154
155
|
/**
|
|
155
156
|
* The json payload of the Credential according to the
|
|
156
157
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model}
|
|
@@ -186,7 +187,7 @@ export interface ICreateVerifiableCredentialLDArgs {
|
|
|
186
187
|
*
|
|
187
188
|
* @beta This API may change without a BREAKING CHANGE notice
|
|
188
189
|
*/
|
|
189
|
-
export interface IVerifyCredentialLDArgs {
|
|
190
|
+
export interface IVerifyCredentialLDArgs extends UsingResolutionOptions {
|
|
190
191
|
/**
|
|
191
192
|
* The json payload of the Credential according to the
|
|
192
193
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model}
|
|
@@ -216,7 +217,7 @@ export interface IVerifyCredentialLDArgs {
|
|
|
216
217
|
*
|
|
217
218
|
* @beta This API may change without a BREAKING CHANGE notice.
|
|
218
219
|
*/
|
|
219
|
-
export interface IVerifyPresentationLDArgs {
|
|
220
|
+
export interface IVerifyPresentationLDArgs extends UsingResolutionOptions {
|
|
220
221
|
/**
|
|
221
222
|
* The json payload of the Credential according to the
|
|
222
223
|
* {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model}
|