@sphereon/ssi-sdk.credential-vcdm-jsonld-provider 0.33.1-next.68 → 0.34.0
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/dist/index.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
- package/src/agent/CredentialProviderJsonld.ts +27 -16
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TKeyType, IKey, CredentialPayload, PresentationPayload, DIDDocument as DIDDocument$2, VerifiableCredential, VerifiablePresentation, IIdentifier } from '@veramo/core';
|
|
2
2
|
import { DIDDocument } from 'did-resolver/lib/resolver';
|
|
3
|
-
import { IVcdmIssuerAgentContext, IVcdmVerifierAgentContext, ContextDoc, IVcdmCredentialProvider, ICanIssueCredentialTypeArgs, ICanVerifyDocumentTypeArgs, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresentationLDArgs,
|
|
3
|
+
import { IVcdmIssuerAgentContext, IVcdmVerifierAgentContext, ContextDoc, IVcdmCredentialProvider, ICanIssueCredentialTypeArgs, ICanVerifyDocumentTypeArgs, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresentationLDArgs, IVerifyCredentialVcdmArgs, IVerifyPresentationLDArgs } from '@sphereon/ssi-sdk.credential-vcdm';
|
|
4
4
|
import { VerifiableCredentialSP, VerifiablePresentationSP } from '@sphereon/ssi-sdk.core';
|
|
5
5
|
import { DIDDocument as DIDDocument$1 } from 'did-resolver';
|
|
6
6
|
import { IIssueCredentialStatusOpts } from '@sphereon/ssi-sdk.vc-status-list';
|
|
@@ -183,7 +183,7 @@ declare class CredentialProviderJsonld implements IVcdmCredentialProvider {
|
|
|
183
183
|
/** {@inheritdoc ICredentialIssuerLD.createVerifiablePresentationLD} */
|
|
184
184
|
createVerifiablePresentation(args: ICreateVerifiablePresentationLDArgs, context: IVcdmIssuerAgentContext): Promise<VerifiablePresentationSP>;
|
|
185
185
|
/** {@inheritdoc ICredentialHandlerLDLocal.verifyCredential} */
|
|
186
|
-
verifyCredential(args:
|
|
186
|
+
verifyCredential(args: IVerifyCredentialVcdmArgs, context: IVcdmVerifierAgentContext): Promise<IVerifyResult>;
|
|
187
187
|
/** {@inheritdoc ICredentialHandlerLDLocal.verifyPresentation} */
|
|
188
188
|
verifyPresentation(args: IVerifyPresentationLDArgs, context: IVcdmVerifierAgentContext): Promise<IVerifyResult>;
|
|
189
189
|
private findSigningKeyWithId;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TKeyType, IKey, CredentialPayload, PresentationPayload, DIDDocument as DIDDocument$2, VerifiableCredential, VerifiablePresentation, IIdentifier } from '@veramo/core';
|
|
2
2
|
import { DIDDocument } from 'did-resolver/lib/resolver';
|
|
3
|
-
import { IVcdmIssuerAgentContext, IVcdmVerifierAgentContext, ContextDoc, IVcdmCredentialProvider, ICanIssueCredentialTypeArgs, ICanVerifyDocumentTypeArgs, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresentationLDArgs,
|
|
3
|
+
import { IVcdmIssuerAgentContext, IVcdmVerifierAgentContext, ContextDoc, IVcdmCredentialProvider, ICanIssueCredentialTypeArgs, ICanVerifyDocumentTypeArgs, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresentationLDArgs, IVerifyCredentialVcdmArgs, IVerifyPresentationLDArgs } from '@sphereon/ssi-sdk.credential-vcdm';
|
|
4
4
|
import { VerifiableCredentialSP, VerifiablePresentationSP } from '@sphereon/ssi-sdk.core';
|
|
5
5
|
import { DIDDocument as DIDDocument$1 } from 'did-resolver';
|
|
6
6
|
import { IIssueCredentialStatusOpts } from '@sphereon/ssi-sdk.vc-status-list';
|
|
@@ -183,7 +183,7 @@ declare class CredentialProviderJsonld implements IVcdmCredentialProvider {
|
|
|
183
183
|
/** {@inheritdoc ICredentialIssuerLD.createVerifiablePresentationLD} */
|
|
184
184
|
createVerifiablePresentation(args: ICreateVerifiablePresentationLDArgs, context: IVcdmIssuerAgentContext): Promise<VerifiablePresentationSP>;
|
|
185
185
|
/** {@inheritdoc ICredentialHandlerLDLocal.verifyCredential} */
|
|
186
|
-
verifyCredential(args:
|
|
186
|
+
verifyCredential(args: IVerifyCredentialVcdmArgs, context: IVcdmVerifierAgentContext): Promise<IVerifyResult>;
|
|
187
187
|
/** {@inheritdoc ICredentialHandlerLDLocal.verifyPresentation} */
|
|
188
188
|
verifyPresentation(args: IVerifyPresentationLDArgs, context: IVcdmVerifierAgentContext): Promise<IVerifyResult>;
|
|
189
189
|
private findSigningKeyWithId;
|
package/dist/index.js
CHANGED
|
@@ -2881,9 +2881,9 @@ var LdDefaultContexts = /* @__PURE__ */ new Map([
|
|
|
2881
2881
|
// src/agent/CredentialProviderJsonld.ts
|
|
2882
2882
|
import { getAgentResolver as getAgentResolver2, mapIdentifierKeysToDocWithJwkSupport } from "@sphereon/ssi-sdk-ext.did-utils";
|
|
2883
2883
|
import { asArray as asArray4, intersect } from "@sphereon/ssi-sdk.core";
|
|
2884
|
+
import { preProcessCredentialPayload, preProcessPresentation } from "@sphereon/ssi-sdk.credential-vcdm";
|
|
2884
2885
|
import { vcLibCheckStatusFunction } from "@sphereon/ssi-sdk.vc-status-list";
|
|
2885
2886
|
import Debug3 from "debug";
|
|
2886
|
-
import { preProcessCredentialPayload, preProcessPresentation } from "@sphereon/ssi-sdk.credential-vcdm";
|
|
2887
2887
|
var debug3 = Debug3("sphereon:ssi-sdk:ld-credential-module-local");
|
|
2888
2888
|
var CredentialProviderJsonld = class {
|
|
2889
2889
|
static {
|
|
@@ -2923,6 +2923,9 @@ var CredentialProviderJsonld = class {
|
|
|
2923
2923
|
/** {@inheritdoc @veramo/credential-w3c#AbstractCredentialProvider.canVerifyDocumentType */
|
|
2924
2924
|
canVerifyDocumentType(args) {
|
|
2925
2925
|
const { document } = args;
|
|
2926
|
+
if (typeof document === "string") {
|
|
2927
|
+
return false;
|
|
2928
|
+
}
|
|
2926
2929
|
const proofType = document?.proof?.type ?? "_never_";
|
|
2927
2930
|
for (const suite of this.ldCredentialModule.ldSuiteLoader.getAllSignatureSuites()) {
|
|
2928
2931
|
if (suite.getSupportedProofType() === proofType) {
|