@sphereon/ssi-sdk-ext.identifier-resolution 0.29.1-next.3 → 0.34.1-feature.merge.crypto.extensions.modules.33

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.d.cts CHANGED
@@ -1,34 +1,10 @@
1
- import { JWK, ICoseKeyJson, IParsedDID } from '@sphereon/ssi-types';
1
+ import { JWK, ICoseKeyJson, IParsedDID, IValidationResult } from '@sphereon/ssi-types';
2
2
  import { DIDDocumentSection, DIDDocument, DIDResolutionResult, IIdentifier, IKey, TKeyType, IPluginMethodMap, IAgentContext, IKeyManager, IDIDManager, IAgentPlugin, IResolver } from '@veramo/core';
3
3
  import { DidDocumentJwks } from '@sphereon/ssi-sdk-ext.did-utils';
4
4
  import { X509CertificateChainValidationOpts, X509ValidationResult, ClientIdScheme } from '@sphereon/ssi-sdk-ext.x509-utils';
5
5
  import { webcrypto } from 'node:crypto';
6
6
  import { IOIDFClient } from '@sphereon/ssi-sdk.oidf-client';
7
7
 
8
- // Copy of jwt-service typings since we cannot include that as devDependency due to cyclic dep
9
- /*
10
- import {
11
- ExternalIdentifierDidOpts,
12
- ExternalIdentifierResult,
13
- ExternalIdentifierX5cOpts,
14
- IIdentifierResolution,
15
- ManagedIdentifierOptsOrResult,
16
- ManagedIdentifierResult,
17
- } from '../types'*/
18
-
19
- interface BaseJwtPayload {
20
- iss?: string
21
- sub?: string
22
- aud?: string[] | string
23
- exp?: number
24
- nbf?: number
25
- iat?: number
26
- jti?: string
27
- }
28
- interface JwsPayload extends BaseJwtPayload {
29
- [key: string]: unknown
30
- }
31
-
32
8
  /**
33
9
  * Use whenever we need to resolve an external identifier. We can pass in kids, DIDs, and x5chains
34
10
  *
@@ -120,7 +96,7 @@ interface ExternalIdentifierOIDFEntityIdResult extends IExternalIdentifierResult
120
96
  method: 'entity_id';
121
97
  trustedAnchors: Array<TrustedAnchor>;
122
98
  errorList?: Record<TrustedAnchor, ErrorMessage>;
123
- jwtPayload?: JwsPayload;
99
+ jwtPayload?: JwtPayload;
124
100
  trustEstablished: boolean;
125
101
  }
126
102
  interface ExternalJwkInfo extends JwkInfo {
@@ -135,6 +111,19 @@ interface ExternalIdentifierDidResult extends IExternalIdentifierResultBase {
135
111
  didResolutionResult: Omit<DIDResolutionResult, 'didDocument'>;
136
112
  didParsed: IParsedDID;
137
113
  }
114
+ interface JwtPayload {
115
+ iss?: string;
116
+ sub?: string;
117
+ aud?: string[] | string;
118
+ exp?: number;
119
+ nbf?: number;
120
+ iat?: number;
121
+ jti?: string;
122
+ [key: string]: unknown;
123
+ }
124
+ type IJwsValidationResult = IValidationResult & {
125
+ jws: any;
126
+ };
138
127
 
139
128
  /**
140
129
  * Use whenever we need to pass in an identifier. We can pass in kids, DIDs, IIdentifier objects and x5chains
@@ -436,4 +425,4 @@ declare function legacyKeyRefsToIdentifierOpts(opts: {
436
425
  */
437
426
  declare const schema: any;
438
427
 
439
- export { type ErrorMessage, type ExternalIdentifierCoseKeyOpts, type ExternalIdentifierCoseKeyResult, type ExternalIdentifierDidOpts, type ExternalIdentifierDidResult, type ExternalIdentifierJwkOpts, type ExternalIdentifierJwkResult, type ExternalIdentifierJwksUrlOpts, type ExternalIdentifierKidOpts, type ExternalIdentifierMethod, type ExternalIdentifierOIDFEntityIdOpts, type ExternalIdentifierOIDFEntityIdResult, type ExternalIdentifierOidcDiscoveryOpts, type ExternalIdentifierOpts, type ExternalIdentifierOptsBase, type ExternalIdentifierResult, type ExternalIdentifierType, type ExternalIdentifierX5cOpts, type ExternalIdentifierX5cResult, type ExternalJwkInfo, type IExternalIdentifierResultBase, type IIdentifierResolution, type IManagedIdentifierResultBase, IdentifierResolution, type JwkInfo, type ManagedIdentifierCoseKeyOpts, type ManagedIdentifierCoseKeyResult, type ManagedIdentifierDidOpts, type ManagedIdentifierDidResult, type ManagedIdentifierJwkOpts, type ManagedIdentifierJwkResult, type ManagedIdentifierKeyOpts, type ManagedIdentifierKeyResult, type ManagedIdentifierKidOpts, type ManagedIdentifierKidResult, type ManagedIdentifierMethod, type ManagedIdentifierOID4VCIssuerOpts, type ManagedIdentifierOID4VCIssuerResult, type ManagedIdentifierOpts, type ManagedIdentifierOptsBase, type ManagedIdentifierOptsOrResult, type ManagedIdentifierResult, type ManagedIdentifierType, type ManagedIdentifierX5cOpts, type ManagedIdentifierX5cResult, type ManagedJwkInfo, type PublicKeyHex, type TrustedAnchor, ensureManagedIdentifierResult, getManagedCoseKeyIdentifier, getManagedDidIdentifier, getManagedIdentifier, getManagedJwkIdentifier, getManagedKeyIdentifier, getManagedKidIdentifier, getManagedOID4VCIssuerIdentifier, getManagedX5cIdentifier, identifierResolutionContextMethods, isCoseKeyIdentifier, isDidIdentifier, isExternalIdentifierCoseKeyOpts, isExternalIdentifierDidOpts, isExternalIdentifierJwkOpts, isExternalIdentifierJwksUrlOpts, isExternalIdentifierKidOpts, isExternalIdentifierOIDFEntityIdOpts, isExternalIdentifierOidcDiscoveryOpts, isExternalIdentifierX5cOpts, isIIdentifier, isJwkIdentifier, isJwksUrlIdentifier, isKeyIdentifier, isKidIdentifier, isManagedIdentifierCoseKeyOpts, isManagedIdentifierCoseKeyResult, isManagedIdentifierDidOpts, isManagedIdentifierDidResult, isManagedIdentifierJwkOpts, isManagedIdentifierJwkResult, isManagedIdentifierKeyOpts, isManagedIdentifierKeyResult, isManagedIdentifierKidOpts, isManagedIdentifierKidResult, isManagedIdentifierOID4VCIssuerOpts, isManagedIdentifierResult, isManagedIdentifierX5cOpts, isManagedIdentifierX5cResult, isOID4VCIssuerIdentifier, isOIDFEntityIdIdentifier, isOidcDiscoveryIdentifier, isX5cIdentifier, legacyKeyRefsToIdentifierOpts, managedIdentifierToJwk, managedIdentifierToKeyResult, resolveExternalCoseKeyIdentifier, resolveExternalDidIdentifier, resolveExternalIdentifier, resolveExternalJwkIdentifier, resolveExternalOIDFEntityIdIdentifier, resolveExternalX5cIdentifier, schema };
428
+ export { type ErrorMessage, type ExternalIdentifierCoseKeyOpts, type ExternalIdentifierCoseKeyResult, type ExternalIdentifierDidOpts, type ExternalIdentifierDidResult, type ExternalIdentifierJwkOpts, type ExternalIdentifierJwkResult, type ExternalIdentifierJwksUrlOpts, type ExternalIdentifierKidOpts, type ExternalIdentifierMethod, type ExternalIdentifierOIDFEntityIdOpts, type ExternalIdentifierOIDFEntityIdResult, type ExternalIdentifierOidcDiscoveryOpts, type ExternalIdentifierOpts, type ExternalIdentifierOptsBase, type ExternalIdentifierResult, type ExternalIdentifierType, type ExternalIdentifierX5cOpts, type ExternalIdentifierX5cResult, type ExternalJwkInfo, type IExternalIdentifierResultBase, type IIdentifierResolution, type IJwsValidationResult, type IManagedIdentifierResultBase, IdentifierResolution, type JwkInfo, type JwtPayload, type ManagedIdentifierCoseKeyOpts, type ManagedIdentifierCoseKeyResult, type ManagedIdentifierDidOpts, type ManagedIdentifierDidResult, type ManagedIdentifierJwkOpts, type ManagedIdentifierJwkResult, type ManagedIdentifierKeyOpts, type ManagedIdentifierKeyResult, type ManagedIdentifierKidOpts, type ManagedIdentifierKidResult, type ManagedIdentifierMethod, type ManagedIdentifierOID4VCIssuerOpts, type ManagedIdentifierOID4VCIssuerResult, type ManagedIdentifierOpts, type ManagedIdentifierOptsBase, type ManagedIdentifierOptsOrResult, type ManagedIdentifierResult, type ManagedIdentifierType, type ManagedIdentifierX5cOpts, type ManagedIdentifierX5cResult, type ManagedJwkInfo, type PublicKeyHex, type TrustedAnchor, ensureManagedIdentifierResult, getManagedCoseKeyIdentifier, getManagedDidIdentifier, getManagedIdentifier, getManagedJwkIdentifier, getManagedKeyIdentifier, getManagedKidIdentifier, getManagedOID4VCIssuerIdentifier, getManagedX5cIdentifier, identifierResolutionContextMethods, isCoseKeyIdentifier, isDidIdentifier, isExternalIdentifierCoseKeyOpts, isExternalIdentifierDidOpts, isExternalIdentifierJwkOpts, isExternalIdentifierJwksUrlOpts, isExternalIdentifierKidOpts, isExternalIdentifierOIDFEntityIdOpts, isExternalIdentifierOidcDiscoveryOpts, isExternalIdentifierX5cOpts, isIIdentifier, isJwkIdentifier, isJwksUrlIdentifier, isKeyIdentifier, isKidIdentifier, isManagedIdentifierCoseKeyOpts, isManagedIdentifierCoseKeyResult, isManagedIdentifierDidOpts, isManagedIdentifierDidResult, isManagedIdentifierJwkOpts, isManagedIdentifierJwkResult, isManagedIdentifierKeyOpts, isManagedIdentifierKeyResult, isManagedIdentifierKidOpts, isManagedIdentifierKidResult, isManagedIdentifierOID4VCIssuerOpts, isManagedIdentifierResult, isManagedIdentifierX5cOpts, isManagedIdentifierX5cResult, isOID4VCIssuerIdentifier, isOIDFEntityIdIdentifier, isOidcDiscoveryIdentifier, isX5cIdentifier, legacyKeyRefsToIdentifierOpts, managedIdentifierToJwk, managedIdentifierToKeyResult, resolveExternalCoseKeyIdentifier, resolveExternalDidIdentifier, resolveExternalIdentifier, resolveExternalJwkIdentifier, resolveExternalOIDFEntityIdIdentifier, resolveExternalX5cIdentifier, schema };
package/dist/index.d.ts CHANGED
@@ -1,34 +1,10 @@
1
- import { JWK, ICoseKeyJson, IParsedDID } from '@sphereon/ssi-types';
1
+ import { JWK, ICoseKeyJson, IParsedDID, IValidationResult } from '@sphereon/ssi-types';
2
2
  import { DIDDocumentSection, DIDDocument, DIDResolutionResult, IIdentifier, IKey, TKeyType, IPluginMethodMap, IAgentContext, IKeyManager, IDIDManager, IAgentPlugin, IResolver } from '@veramo/core';
3
3
  import { DidDocumentJwks } from '@sphereon/ssi-sdk-ext.did-utils';
4
4
  import { X509CertificateChainValidationOpts, X509ValidationResult, ClientIdScheme } from '@sphereon/ssi-sdk-ext.x509-utils';
5
5
  import { webcrypto } from 'node:crypto';
6
6
  import { IOIDFClient } from '@sphereon/ssi-sdk.oidf-client';
7
7
 
8
- // Copy of jwt-service typings since we cannot include that as devDependency due to cyclic dep
9
- /*
10
- import {
11
- ExternalIdentifierDidOpts,
12
- ExternalIdentifierResult,
13
- ExternalIdentifierX5cOpts,
14
- IIdentifierResolution,
15
- ManagedIdentifierOptsOrResult,
16
- ManagedIdentifierResult,
17
- } from '../types'*/
18
-
19
- interface BaseJwtPayload {
20
- iss?: string
21
- sub?: string
22
- aud?: string[] | string
23
- exp?: number
24
- nbf?: number
25
- iat?: number
26
- jti?: string
27
- }
28
- interface JwsPayload extends BaseJwtPayload {
29
- [key: string]: unknown
30
- }
31
-
32
8
  /**
33
9
  * Use whenever we need to resolve an external identifier. We can pass in kids, DIDs, and x5chains
34
10
  *
@@ -120,7 +96,7 @@ interface ExternalIdentifierOIDFEntityIdResult extends IExternalIdentifierResult
120
96
  method: 'entity_id';
121
97
  trustedAnchors: Array<TrustedAnchor>;
122
98
  errorList?: Record<TrustedAnchor, ErrorMessage>;
123
- jwtPayload?: JwsPayload;
99
+ jwtPayload?: JwtPayload;
124
100
  trustEstablished: boolean;
125
101
  }
126
102
  interface ExternalJwkInfo extends JwkInfo {
@@ -135,6 +111,19 @@ interface ExternalIdentifierDidResult extends IExternalIdentifierResultBase {
135
111
  didResolutionResult: Omit<DIDResolutionResult, 'didDocument'>;
136
112
  didParsed: IParsedDID;
137
113
  }
114
+ interface JwtPayload {
115
+ iss?: string;
116
+ sub?: string;
117
+ aud?: string[] | string;
118
+ exp?: number;
119
+ nbf?: number;
120
+ iat?: number;
121
+ jti?: string;
122
+ [key: string]: unknown;
123
+ }
124
+ type IJwsValidationResult = IValidationResult & {
125
+ jws: any;
126
+ };
138
127
 
139
128
  /**
140
129
  * Use whenever we need to pass in an identifier. We can pass in kids, DIDs, IIdentifier objects and x5chains
@@ -436,4 +425,4 @@ declare function legacyKeyRefsToIdentifierOpts(opts: {
436
425
  */
437
426
  declare const schema: any;
438
427
 
439
- export { type ErrorMessage, type ExternalIdentifierCoseKeyOpts, type ExternalIdentifierCoseKeyResult, type ExternalIdentifierDidOpts, type ExternalIdentifierDidResult, type ExternalIdentifierJwkOpts, type ExternalIdentifierJwkResult, type ExternalIdentifierJwksUrlOpts, type ExternalIdentifierKidOpts, type ExternalIdentifierMethod, type ExternalIdentifierOIDFEntityIdOpts, type ExternalIdentifierOIDFEntityIdResult, type ExternalIdentifierOidcDiscoveryOpts, type ExternalIdentifierOpts, type ExternalIdentifierOptsBase, type ExternalIdentifierResult, type ExternalIdentifierType, type ExternalIdentifierX5cOpts, type ExternalIdentifierX5cResult, type ExternalJwkInfo, type IExternalIdentifierResultBase, type IIdentifierResolution, type IManagedIdentifierResultBase, IdentifierResolution, type JwkInfo, type ManagedIdentifierCoseKeyOpts, type ManagedIdentifierCoseKeyResult, type ManagedIdentifierDidOpts, type ManagedIdentifierDidResult, type ManagedIdentifierJwkOpts, type ManagedIdentifierJwkResult, type ManagedIdentifierKeyOpts, type ManagedIdentifierKeyResult, type ManagedIdentifierKidOpts, type ManagedIdentifierKidResult, type ManagedIdentifierMethod, type ManagedIdentifierOID4VCIssuerOpts, type ManagedIdentifierOID4VCIssuerResult, type ManagedIdentifierOpts, type ManagedIdentifierOptsBase, type ManagedIdentifierOptsOrResult, type ManagedIdentifierResult, type ManagedIdentifierType, type ManagedIdentifierX5cOpts, type ManagedIdentifierX5cResult, type ManagedJwkInfo, type PublicKeyHex, type TrustedAnchor, ensureManagedIdentifierResult, getManagedCoseKeyIdentifier, getManagedDidIdentifier, getManagedIdentifier, getManagedJwkIdentifier, getManagedKeyIdentifier, getManagedKidIdentifier, getManagedOID4VCIssuerIdentifier, getManagedX5cIdentifier, identifierResolutionContextMethods, isCoseKeyIdentifier, isDidIdentifier, isExternalIdentifierCoseKeyOpts, isExternalIdentifierDidOpts, isExternalIdentifierJwkOpts, isExternalIdentifierJwksUrlOpts, isExternalIdentifierKidOpts, isExternalIdentifierOIDFEntityIdOpts, isExternalIdentifierOidcDiscoveryOpts, isExternalIdentifierX5cOpts, isIIdentifier, isJwkIdentifier, isJwksUrlIdentifier, isKeyIdentifier, isKidIdentifier, isManagedIdentifierCoseKeyOpts, isManagedIdentifierCoseKeyResult, isManagedIdentifierDidOpts, isManagedIdentifierDidResult, isManagedIdentifierJwkOpts, isManagedIdentifierJwkResult, isManagedIdentifierKeyOpts, isManagedIdentifierKeyResult, isManagedIdentifierKidOpts, isManagedIdentifierKidResult, isManagedIdentifierOID4VCIssuerOpts, isManagedIdentifierResult, isManagedIdentifierX5cOpts, isManagedIdentifierX5cResult, isOID4VCIssuerIdentifier, isOIDFEntityIdIdentifier, isOidcDiscoveryIdentifier, isX5cIdentifier, legacyKeyRefsToIdentifierOpts, managedIdentifierToJwk, managedIdentifierToKeyResult, resolveExternalCoseKeyIdentifier, resolveExternalDidIdentifier, resolveExternalIdentifier, resolveExternalJwkIdentifier, resolveExternalOIDFEntityIdIdentifier, resolveExternalX5cIdentifier, schema };
428
+ export { type ErrorMessage, type ExternalIdentifierCoseKeyOpts, type ExternalIdentifierCoseKeyResult, type ExternalIdentifierDidOpts, type ExternalIdentifierDidResult, type ExternalIdentifierJwkOpts, type ExternalIdentifierJwkResult, type ExternalIdentifierJwksUrlOpts, type ExternalIdentifierKidOpts, type ExternalIdentifierMethod, type ExternalIdentifierOIDFEntityIdOpts, type ExternalIdentifierOIDFEntityIdResult, type ExternalIdentifierOidcDiscoveryOpts, type ExternalIdentifierOpts, type ExternalIdentifierOptsBase, type ExternalIdentifierResult, type ExternalIdentifierType, type ExternalIdentifierX5cOpts, type ExternalIdentifierX5cResult, type ExternalJwkInfo, type IExternalIdentifierResultBase, type IIdentifierResolution, type IJwsValidationResult, type IManagedIdentifierResultBase, IdentifierResolution, type JwkInfo, type JwtPayload, type ManagedIdentifierCoseKeyOpts, type ManagedIdentifierCoseKeyResult, type ManagedIdentifierDidOpts, type ManagedIdentifierDidResult, type ManagedIdentifierJwkOpts, type ManagedIdentifierJwkResult, type ManagedIdentifierKeyOpts, type ManagedIdentifierKeyResult, type ManagedIdentifierKidOpts, type ManagedIdentifierKidResult, type ManagedIdentifierMethod, type ManagedIdentifierOID4VCIssuerOpts, type ManagedIdentifierOID4VCIssuerResult, type ManagedIdentifierOpts, type ManagedIdentifierOptsBase, type ManagedIdentifierOptsOrResult, type ManagedIdentifierResult, type ManagedIdentifierType, type ManagedIdentifierX5cOpts, type ManagedIdentifierX5cResult, type ManagedJwkInfo, type PublicKeyHex, type TrustedAnchor, ensureManagedIdentifierResult, getManagedCoseKeyIdentifier, getManagedDidIdentifier, getManagedIdentifier, getManagedJwkIdentifier, getManagedKeyIdentifier, getManagedKidIdentifier, getManagedOID4VCIssuerIdentifier, getManagedX5cIdentifier, identifierResolutionContextMethods, isCoseKeyIdentifier, isDidIdentifier, isExternalIdentifierCoseKeyOpts, isExternalIdentifierDidOpts, isExternalIdentifierJwkOpts, isExternalIdentifierJwksUrlOpts, isExternalIdentifierKidOpts, isExternalIdentifierOIDFEntityIdOpts, isExternalIdentifierOidcDiscoveryOpts, isExternalIdentifierX5cOpts, isIIdentifier, isJwkIdentifier, isJwksUrlIdentifier, isKeyIdentifier, isKidIdentifier, isManagedIdentifierCoseKeyOpts, isManagedIdentifierCoseKeyResult, isManagedIdentifierDidOpts, isManagedIdentifierDidResult, isManagedIdentifierJwkOpts, isManagedIdentifierJwkResult, isManagedIdentifierKeyOpts, isManagedIdentifierKeyResult, isManagedIdentifierKidOpts, isManagedIdentifierKidResult, isManagedIdentifierOID4VCIssuerOpts, isManagedIdentifierResult, isManagedIdentifierX5cOpts, isManagedIdentifierX5cResult, isOID4VCIssuerIdentifier, isOIDFEntityIdIdentifier, isOidcDiscoveryIdentifier, isX5cIdentifier, legacyKeyRefsToIdentifierOpts, managedIdentifierToJwk, managedIdentifierToKeyResult, resolveExternalCoseKeyIdentifier, resolveExternalDidIdentifier, resolveExternalIdentifier, resolveExternalJwkIdentifier, resolveExternalOIDFEntityIdIdentifier, resolveExternalX5cIdentifier, schema };