@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.78.306 → 0.34.1-feature.SSISDK.82.linkedVP.326
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 +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/agent/OID4VCIHolder.ts +6 -6
- package/src/services/OID4VCIHolderService.ts +1 -1
- package/src/types/IOID4VCIHolder.ts +10 -10
package/dist/index.d.cts
CHANGED
|
@@ -2,16 +2,16 @@ import { AuthorizationChallengeCodeResponse, EndpointMetadataResult, CredentialO
|
|
|
2
2
|
import { IIdentifierResolution, ManagedIdentifierMethod, ManagedIdentifierOptsOrResult, ManagedIdentifierResult } from '@sphereon/ssi-sdk-ext.identifier-resolution';
|
|
3
3
|
import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service';
|
|
4
4
|
import { IIdentifier, IPluginMethodMap, IAgentContext, ICredentialVerifier, ICredentialIssuer, IDIDManager, IResolver, IKeyManager, TKeyType, VerificationPolicies, TAgent, IAgentPlugin } from '@veramo/core';
|
|
5
|
-
import { OpenID4VCIClientState, OpenID4VCIClient } from '@sphereon/oid4vci-client';
|
|
6
5
|
import { DynamicRegistrationClientMetadata } from '@sphereon/oid4vc-common';
|
|
6
|
+
import { OpenID4VCIClientState, OpenID4VCIClientV1_0_15 } from '@sphereon/oid4vci-client';
|
|
7
7
|
import { SupportedDidMethodEnum, CreateOrGetIdentifierOpts, IdentifierProviderOpts } from '@sphereon/ssi-sdk-ext.did-utils';
|
|
8
8
|
import { IContactManager } from '@sphereon/ssi-sdk.contact-manager';
|
|
9
9
|
import { UniqueDigitalCredential, ICredentialStore } from '@sphereon/ssi-sdk.credential-store';
|
|
10
|
+
import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation';
|
|
10
11
|
import { Party, DidAuthConfig, IIssuerLocaleBranding, IBasicIssuerLocaleBranding, IBasicCredentialLocaleBranding, Identity, DigitalCredential, IBasicCredentialClaim } from '@sphereon/ssi-sdk.data-store-types';
|
|
11
12
|
import { IIssuanceBranding } from '@sphereon/ssi-sdk.issuance-branding';
|
|
12
13
|
import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc';
|
|
13
14
|
import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt';
|
|
14
|
-
import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation';
|
|
15
15
|
import { IDidAuthSiopOpAuthenticator, CreateConfigResult } from '@sphereon/ssi-sdk.siopv2-oid4vp-op-auth';
|
|
16
16
|
import { IVerifiableCredential, W3CVerifiableCredential, WrappedVerifiableCredential, WrappedVerifiablePresentation, JoseSignatureAlgorithm, JoseSignatureAlgorithmString, HasherSync, SdJwtTypeDisplayMetadata, SdJwtClaimMetadata, OriginalVerifiableCredential } from '@sphereon/ssi-types';
|
|
17
17
|
import { Interpreter, State, StatesConfig, StateMachine, BaseActionObject, ServiceMap, ResolveTypegenMeta, TypegenDisabled } from 'xstate';
|
|
@@ -493,7 +493,7 @@ type CredentialToAccept = {
|
|
|
493
493
|
credentialResponse: CredentialResponseV1_0_15 | CredentialResponse;
|
|
494
494
|
};
|
|
495
495
|
type GetCredentialConfigsSupportedArgs = {
|
|
496
|
-
client:
|
|
496
|
+
client: OpenID4VCIClientV1_0_15;
|
|
497
497
|
vcFormatPreferences: Array<string>;
|
|
498
498
|
format?: Array<string>;
|
|
499
499
|
types?: Array<Array<string>>;
|
|
@@ -504,7 +504,7 @@ type GetCredentialConfigsSupportedArgs = {
|
|
|
504
504
|
* It can potentially return multiple results mainly because of different formats.
|
|
505
505
|
*/
|
|
506
506
|
type GetCredentialConfigsSupportedBySingleTypeOrIdArgs = {
|
|
507
|
-
client:
|
|
507
|
+
client: OpenID4VCIClientV1_0_15;
|
|
508
508
|
vcFormatPreferences: Array<string>;
|
|
509
509
|
format?: string[];
|
|
510
510
|
types?: string[];
|
|
@@ -533,7 +533,7 @@ type GetDefaultIssuanceOptsArgs = {
|
|
|
533
533
|
context: RequiredContext;
|
|
534
534
|
};
|
|
535
535
|
type DefaultIssuanceOpts = {
|
|
536
|
-
client:
|
|
536
|
+
client: OpenID4VCIClientV1_0_15;
|
|
537
537
|
};
|
|
538
538
|
type GetIdentifierArgs = {
|
|
539
539
|
issuanceOpt: IssuanceOpts;
|
|
@@ -563,7 +563,7 @@ type CreateIdentifierCreateOpts = {
|
|
|
563
563
|
options?: IdentifierProviderOpts;
|
|
564
564
|
};
|
|
565
565
|
type GetIssuanceOptsArgs = {
|
|
566
|
-
client:
|
|
566
|
+
client: OpenID4VCIClientV1_0_15;
|
|
567
567
|
credentialsSupported: Record<string, CredentialConfigurationSupported>;
|
|
568
568
|
serverMetadata: EndpointMetadataResult;
|
|
569
569
|
context: RequiredContext;
|
|
@@ -574,19 +574,19 @@ type GetIssuanceOptsArgs = {
|
|
|
574
574
|
};
|
|
575
575
|
type GetIssuanceDidMethodArgs = {
|
|
576
576
|
credentialSupported: CredentialConfigurationSupported;
|
|
577
|
-
client:
|
|
577
|
+
client: OpenID4VCIClientV1_0_15;
|
|
578
578
|
didMethodPreferences: Array<SupportedDidMethodEnum>;
|
|
579
579
|
};
|
|
580
580
|
type GetIssuanceCryptoSuiteArgs = {
|
|
581
581
|
credentialSupported: CredentialConfigurationSupported;
|
|
582
|
-
client:
|
|
582
|
+
client: OpenID4VCIClientV1_0_15;
|
|
583
583
|
jwtCryptographicSuitePreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString>;
|
|
584
584
|
jsonldCryptographicSuitePreferences: Array<string>;
|
|
585
585
|
};
|
|
586
586
|
type GetCredentialArgs = {
|
|
587
587
|
pin?: string;
|
|
588
588
|
issuanceOpt: IssuanceOpts;
|
|
589
|
-
client:
|
|
589
|
+
client: OpenID4VCIClientV1_0_15;
|
|
590
590
|
accessTokenOpts?: AccessTokenOpts;
|
|
591
591
|
};
|
|
592
592
|
type AccessTokenOpts = {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,16 +2,16 @@ import { AuthorizationChallengeCodeResponse, EndpointMetadataResult, CredentialO
|
|
|
2
2
|
import { IIdentifierResolution, ManagedIdentifierMethod, ManagedIdentifierOptsOrResult, ManagedIdentifierResult } from '@sphereon/ssi-sdk-ext.identifier-resolution';
|
|
3
3
|
import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service';
|
|
4
4
|
import { IIdentifier, IPluginMethodMap, IAgentContext, ICredentialVerifier, ICredentialIssuer, IDIDManager, IResolver, IKeyManager, TKeyType, VerificationPolicies, TAgent, IAgentPlugin } from '@veramo/core';
|
|
5
|
-
import { OpenID4VCIClientState, OpenID4VCIClient } from '@sphereon/oid4vci-client';
|
|
6
5
|
import { DynamicRegistrationClientMetadata } from '@sphereon/oid4vc-common';
|
|
6
|
+
import { OpenID4VCIClientState, OpenID4VCIClientV1_0_15 } from '@sphereon/oid4vci-client';
|
|
7
7
|
import { SupportedDidMethodEnum, CreateOrGetIdentifierOpts, IdentifierProviderOpts } from '@sphereon/ssi-sdk-ext.did-utils';
|
|
8
8
|
import { IContactManager } from '@sphereon/ssi-sdk.contact-manager';
|
|
9
9
|
import { UniqueDigitalCredential, ICredentialStore } from '@sphereon/ssi-sdk.credential-store';
|
|
10
|
+
import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation';
|
|
10
11
|
import { Party, DidAuthConfig, IIssuerLocaleBranding, IBasicIssuerLocaleBranding, IBasicCredentialLocaleBranding, Identity, DigitalCredential, IBasicCredentialClaim } from '@sphereon/ssi-sdk.data-store-types';
|
|
11
12
|
import { IIssuanceBranding } from '@sphereon/ssi-sdk.issuance-branding';
|
|
12
13
|
import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc';
|
|
13
14
|
import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt';
|
|
14
|
-
import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation';
|
|
15
15
|
import { IDidAuthSiopOpAuthenticator, CreateConfigResult } from '@sphereon/ssi-sdk.siopv2-oid4vp-op-auth';
|
|
16
16
|
import { IVerifiableCredential, W3CVerifiableCredential, WrappedVerifiableCredential, WrappedVerifiablePresentation, JoseSignatureAlgorithm, JoseSignatureAlgorithmString, HasherSync, SdJwtTypeDisplayMetadata, SdJwtClaimMetadata, OriginalVerifiableCredential } from '@sphereon/ssi-types';
|
|
17
17
|
import { Interpreter, State, StatesConfig, StateMachine, BaseActionObject, ServiceMap, ResolveTypegenMeta, TypegenDisabled } from 'xstate';
|
|
@@ -493,7 +493,7 @@ type CredentialToAccept = {
|
|
|
493
493
|
credentialResponse: CredentialResponseV1_0_15 | CredentialResponse;
|
|
494
494
|
};
|
|
495
495
|
type GetCredentialConfigsSupportedArgs = {
|
|
496
|
-
client:
|
|
496
|
+
client: OpenID4VCIClientV1_0_15;
|
|
497
497
|
vcFormatPreferences: Array<string>;
|
|
498
498
|
format?: Array<string>;
|
|
499
499
|
types?: Array<Array<string>>;
|
|
@@ -504,7 +504,7 @@ type GetCredentialConfigsSupportedArgs = {
|
|
|
504
504
|
* It can potentially return multiple results mainly because of different formats.
|
|
505
505
|
*/
|
|
506
506
|
type GetCredentialConfigsSupportedBySingleTypeOrIdArgs = {
|
|
507
|
-
client:
|
|
507
|
+
client: OpenID4VCIClientV1_0_15;
|
|
508
508
|
vcFormatPreferences: Array<string>;
|
|
509
509
|
format?: string[];
|
|
510
510
|
types?: string[];
|
|
@@ -533,7 +533,7 @@ type GetDefaultIssuanceOptsArgs = {
|
|
|
533
533
|
context: RequiredContext;
|
|
534
534
|
};
|
|
535
535
|
type DefaultIssuanceOpts = {
|
|
536
|
-
client:
|
|
536
|
+
client: OpenID4VCIClientV1_0_15;
|
|
537
537
|
};
|
|
538
538
|
type GetIdentifierArgs = {
|
|
539
539
|
issuanceOpt: IssuanceOpts;
|
|
@@ -563,7 +563,7 @@ type CreateIdentifierCreateOpts = {
|
|
|
563
563
|
options?: IdentifierProviderOpts;
|
|
564
564
|
};
|
|
565
565
|
type GetIssuanceOptsArgs = {
|
|
566
|
-
client:
|
|
566
|
+
client: OpenID4VCIClientV1_0_15;
|
|
567
567
|
credentialsSupported: Record<string, CredentialConfigurationSupported>;
|
|
568
568
|
serverMetadata: EndpointMetadataResult;
|
|
569
569
|
context: RequiredContext;
|
|
@@ -574,19 +574,19 @@ type GetIssuanceOptsArgs = {
|
|
|
574
574
|
};
|
|
575
575
|
type GetIssuanceDidMethodArgs = {
|
|
576
576
|
credentialSupported: CredentialConfigurationSupported;
|
|
577
|
-
client:
|
|
577
|
+
client: OpenID4VCIClientV1_0_15;
|
|
578
578
|
didMethodPreferences: Array<SupportedDidMethodEnum>;
|
|
579
579
|
};
|
|
580
580
|
type GetIssuanceCryptoSuiteArgs = {
|
|
581
581
|
credentialSupported: CredentialConfigurationSupported;
|
|
582
|
-
client:
|
|
582
|
+
client: OpenID4VCIClientV1_0_15;
|
|
583
583
|
jwtCryptographicSuitePreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString>;
|
|
584
584
|
jsonldCryptographicSuitePreferences: Array<string>;
|
|
585
585
|
};
|
|
586
586
|
type GetCredentialArgs = {
|
|
587
587
|
pin?: string;
|
|
588
588
|
issuanceOpt: IssuanceOpts;
|
|
589
|
-
client:
|
|
589
|
+
client: OpenID4VCIClientV1_0_15;
|
|
590
590
|
accessTokenOpts?: AccessTokenOpts;
|
|
591
591
|
};
|
|
592
592
|
type AccessTokenOpts = {
|
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ var require_nl = __commonJS({
|
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
// src/agent/OID4VCIHolder.ts
|
|
58
|
-
import { CredentialOfferClient, MetadataClient, OpenID4VCIClient as OpenID4VCIClient2 } from "@sphereon/oid4vci-client";
|
|
58
|
+
import { CredentialOfferClient, MetadataClient, OpenID4VCIClient as OpenID4VCIClient2, OpenID4VCIClientV1_0_15 } from "@sphereon/oid4vci-client";
|
|
59
59
|
import { DefaultURISchemes, getTypesFromObject as getTypesFromObject2 } from "@sphereon/oid4vci-common";
|
|
60
60
|
import { SupportedDidMethodEnum as SupportedDidMethodEnum2 } from "@sphereon/ssi-sdk-ext.did-utils";
|
|
61
61
|
import { isManagedIdentifierDidOpts, isManagedIdentifierDidResult as isManagedIdentifierDidResult2, isManagedIdentifierJwkResult, isManagedIdentifierKidResult, isManagedIdentifierResult as isManagedIdentifierResult2, isManagedIdentifierX5cOpts, isManagedIdentifierX5cResult } from "@sphereon/ssi-sdk-ext.identifier-resolution";
|
|
@@ -1840,7 +1840,7 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
|
|
|
1840
1840
|
}
|
|
1841
1841
|
__name(createIdFromTypes, "createIdFromTypes");
|
|
1842
1842
|
if (configurationId) {
|
|
1843
|
-
const allSupported2 = client.getCredentialsSupported(format);
|
|
1843
|
+
const allSupported2 = client.getCredentialsSupported(void 0, format);
|
|
1844
1844
|
return Object.fromEntries(Object.entries(allSupported2).filter(([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId));
|
|
1845
1845
|
}
|
|
1846
1846
|
if (!client.credentialOffer) {
|
|
@@ -2320,7 +2320,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2320
2320
|
let oid4vciClient;
|
|
2321
2321
|
let offer;
|
|
2322
2322
|
if (requestData.existingClientState) {
|
|
2323
|
-
oid4vciClient = await
|
|
2323
|
+
oid4vciClient = await OpenID4VCIClientV1_0_15.fromState({
|
|
2324
2324
|
state: requestData.existingClientState
|
|
2325
2325
|
});
|
|
2326
2326
|
offer = oid4vciClient.credentialOffer;
|
|
@@ -2337,7 +2337,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2337
2337
|
}
|
|
2338
2338
|
if (!offer) {
|
|
2339
2339
|
logger.log(`Issuer url received (no credential offer): ${uri}`);
|
|
2340
|
-
oid4vciClient = await
|
|
2340
|
+
oid4vciClient = await OpenID4VCIClientV1_0_15.fromCredentialIssuer({
|
|
2341
2341
|
credentialIssuer: uri,
|
|
2342
2342
|
authorizationRequest: authorizationRequestOpts,
|
|
2343
2343
|
clientId: authorizationRequestOpts.clientId,
|
|
@@ -2345,7 +2345,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2345
2345
|
});
|
|
2346
2346
|
} else {
|
|
2347
2347
|
logger.log(`Credential offer received: ${uri}`);
|
|
2348
|
-
oid4vciClient = await
|
|
2348
|
+
oid4vciClient = await OpenID4VCIClientV1_0_15.fromURI({
|
|
2349
2349
|
uri,
|
|
2350
2350
|
authorizationRequest: authorizationRequestOpts,
|
|
2351
2351
|
clientId: authorizationRequestOpts.clientId,
|
|
@@ -2478,7 +2478,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2478
2478
|
if (!openID4VCIClientState) {
|
|
2479
2479
|
return Promise.reject(Error("Missing openID4VCI client state in context"));
|
|
2480
2480
|
}
|
|
2481
|
-
const client = await
|
|
2481
|
+
const client = await OpenID4VCIClientV1_0_15.fromState({
|
|
2482
2482
|
state: openID4VCIClientState
|
|
2483
2483
|
});
|
|
2484
2484
|
const credentialsSupported = await getCredentialConfigsSupportedMerged({
|