@sphereon/oid4vci-common 0.10.1-next.5 → 0.10.1
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/functions/CredentialRequestUtil.d.ts.map +1 -1
- package/dist/functions/CredentialRequestUtil.js +3 -5
- package/dist/functions/CredentialRequestUtil.js.map +1 -1
- package/dist/types/v1_0_11.types.d.ts +2 -5
- package/dist/types/v1_0_11.types.d.ts.map +1 -1
- package/dist/types/v1_0_11.types.js.map +1 -1
- package/lib/functions/CredentialRequestUtil.ts +3 -5
- package/lib/types/v1_0_11.types.ts +2 -7
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CredentialRequestUtil.d.ts","sourceRoot":"","sources":["../../lib/functions/CredentialRequestUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAI3H,wBAAgB,mBAAmB,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,IAAI,CAAC,EAAE;IAAE,0BAA0B,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"CredentialRequestUtil.d.ts","sourceRoot":"","sources":["../../lib/functions/CredentialRequestUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAI3H,wBAAgB,mBAAmB,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,IAAI,CAAC,EAAE;IAAE,0BAA0B,EAAE,OAAO,CAAA;CAAE,YAsB9H;AAED,wBAAgB,8BAA8B,CAC5C,iBAAiB,EAAE,wBAAwB,EAC3C,OAAO,EAAE,iBAAiB,GACzB,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,CAqBhF"}
|
|
@@ -9,14 +9,12 @@ function getTypesFromRequest(credentialRequest, opts) {
|
|
|
9
9
|
types = credentialRequest.types;
|
|
10
10
|
}
|
|
11
11
|
else if (credentialRequest.format === 'jwt_vc_json-ld' || credentialRequest.format === 'ldp_vc') {
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
|
-
// @ts-ignore
|
|
14
12
|
types =
|
|
15
13
|
'credential_definition' in credentialRequest && credentialRequest.credential_definition
|
|
16
|
-
?
|
|
14
|
+
? credentialRequest.credential_definition.types
|
|
15
|
+
: // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
16
|
// @ts-ignore
|
|
18
|
-
credentialRequest.
|
|
19
|
-
: credentialRequest.types;
|
|
17
|
+
credentialRequest.types;
|
|
20
18
|
}
|
|
21
19
|
else if (credentialRequest.format === 'vc+sd-jwt') {
|
|
22
20
|
types = [credentialRequest.vct];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CredentialRequestUtil.js","sourceRoot":"","sources":["../../lib/functions/CredentialRequestUtil.ts"],"names":[],"mappings":";;;AAAA,oCAA2H;AAE3H,+CAAoD;AAEpD,SAAgB,mBAAmB,CAAC,iBAA2C,EAAE,IAA8C;IAC7H,IAAI,KAAK,GAAa,EAAE,CAAC;IACzB,IAAI,iBAAiB,CAAC,MAAM,KAAK,aAAa,IAAI,iBAAiB,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxF,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC;IAClC,CAAC;SAAM,IAAI,iBAAiB,CAAC,MAAM,KAAK,gBAAgB,IAAI,iBAAiB,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAClG,
|
|
1
|
+
{"version":3,"file":"CredentialRequestUtil.js","sourceRoot":"","sources":["../../lib/functions/CredentialRequestUtil.ts"],"names":[],"mappings":";;;AAAA,oCAA2H;AAE3H,+CAAoD;AAEpD,SAAgB,mBAAmB,CAAC,iBAA2C,EAAE,IAA8C;IAC7H,IAAI,KAAK,GAAa,EAAE,CA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E,CAAC,CAAC;QAE3F,OAAO;YACL,MAAM,EAAE,YAAY;YACpB,KAAK,EAAE,iBAAiB,CAAC,KAAK;YAC9B,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACoB,CAAC;QACrC;;;;;;;wCAOgC;IAClC,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAxBD,wEAwBC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthorizationDetailsJwtVcJson, CommonAuthorizationRequest } from './Authorization.types';
|
|
2
|
-
import { CommonCredentialRequest, CredentialDataSupplierInput, CredentialIssuerMetadataOpts, CredentialOfferFormat, CredentialRequestJwtVcJson, CredentialRequestSdJwtVc, Grant
|
|
2
|
+
import { CommonCredentialRequest, CredentialDataSupplierInput, CredentialIssuerMetadataOpts, CredentialOfferFormat, CredentialRequestJwtVcJson, CredentialRequestJwtVcJsonLdAndLdpVc, CredentialRequestSdJwtVc, Grant } from './Generic.types';
|
|
3
3
|
import { QRCodeOpts } from './QRCode.types';
|
|
4
4
|
import { AuthorizationServerMetadata } from './ServerMetadata';
|
|
5
5
|
export interface CredentialOfferV1_0_11 {
|
|
@@ -42,10 +42,7 @@ export interface CredentialOfferPayloadV1_0_11 {
|
|
|
42
42
|
*/
|
|
43
43
|
client_id?: string;
|
|
44
44
|
}
|
|
45
|
-
export type CredentialRequestV1_0_11 = CommonCredentialRequest & (CredentialRequestJwtVcJson |
|
|
46
|
-
export interface CredentialRequestJwtVcJsonLdAndLdpVcV1_0_11 extends CommonCredentialRequest, Pick<JsonLdIssuerCredentialDefinition, 'credentialSubject' | 'types'> {
|
|
47
|
-
format: 'ldp_vc' | 'jwt_vc_json-ld';
|
|
48
|
-
}
|
|
45
|
+
export type CredentialRequestV1_0_11 = CommonCredentialRequest & (CredentialRequestJwtVcJson | CredentialRequestJwtVcJsonLdAndLdpVc | CredentialRequestSdJwtVc);
|
|
49
46
|
export interface CredentialIssuerMetadataV1_0_11 extends CredentialIssuerMetadataOpts, Partial<AuthorizationServerMetadata> {
|
|
50
47
|
credential_endpoint: string;
|
|
51
48
|
authorization_server?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1_0_11.types.d.ts","sourceRoot":"","sources":["../../lib/types/v1_0_11.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAClG,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,KAAK,
|
|
1
|
+
{"version":3,"file":"v1_0_11.types.d.ts","sourceRoot":"","sources":["../../lib/types/v1_0_11.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAClG,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,0BAA0B,EAC1B,oCAAoC,EACpC,wBAAwB,EACxB,KAAK,EACN,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,CAAC,EAAE,6BAA6B,CAAC;IACjD,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2BAA2B,CAAC,EAAE,2BAA2B,CAAC;CAC3D;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;;;OAQG;IACH,WAAW,EAAE,CAAC,qBAAqB,GAAG,MAAM,CAAC,EAAE,CAAC;IAChD;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,GAC5D,CAAC,0BAA0B,GAAG,oCAAoC,GAAG,wBAAwB,CAAC,CAAC;AAEjG,MAAM,WAAW,+BAAgC,SAAQ,4BAA4B,EAAE,OAAO,CAAC,2BAA2B,CAAC;IACzH,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,2BAA4B,SAAQ,6BAA6B,EAAE,6BAA6B;IAC/G,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAE1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1_0_11.types.js","sourceRoot":"","sources":["../../lib/types/v1_0_11.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"v1_0_11.types.js","sourceRoot":"","sources":["../../lib/types/v1_0_11.types.ts"],"names":[],"mappings":";;;AAuEA,qDAAqD;AACrD,SAAgB,6BAA6B,CAAC,OAAmC;IAC/E,OAAO,OAAO,IAAI,cAAc,IAAI,OAAO,CAAC;AAC9C,CAAC;AAFD,sEAEC"}
|
|
@@ -7,14 +7,12 @@ export function getTypesFromRequest(credentialRequest: UniformCredentialRequest,
|
|
|
7
7
|
if (credentialRequest.format === 'jwt_vc_json' || credentialRequest.format === 'jwt_vc') {
|
|
8
8
|
types = credentialRequest.types;
|
|
9
9
|
} else if (credentialRequest.format === 'jwt_vc_json-ld' || credentialRequest.format === 'ldp_vc') {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
|
-
// @ts-ignore
|
|
12
10
|
types =
|
|
13
11
|
'credential_definition' in credentialRequest && credentialRequest.credential_definition
|
|
14
|
-
?
|
|
12
|
+
? credentialRequest.credential_definition.types
|
|
13
|
+
: // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
14
|
// @ts-ignore
|
|
16
|
-
credentialRequest.
|
|
17
|
-
: credentialRequest.types;
|
|
15
|
+
credentialRequest.types;
|
|
18
16
|
} else if (credentialRequest.format === 'vc+sd-jwt') {
|
|
19
17
|
types = [credentialRequest.vct];
|
|
20
18
|
}
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
CredentialIssuerMetadataOpts,
|
|
6
6
|
CredentialOfferFormat,
|
|
7
7
|
CredentialRequestJwtVcJson,
|
|
8
|
+
CredentialRequestJwtVcJsonLdAndLdpVc,
|
|
8
9
|
CredentialRequestSdJwtVc,
|
|
9
10
|
Grant,
|
|
10
|
-
JsonLdIssuerCredentialDefinition,
|
|
11
11
|
} from './Generic.types';
|
|
12
12
|
import { QRCodeOpts } from './QRCode.types';
|
|
13
13
|
import { AuthorizationServerMetadata } from './ServerMetadata';
|
|
@@ -58,13 +58,8 @@ export interface CredentialOfferPayloadV1_0_11 {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export type CredentialRequestV1_0_11 = CommonCredentialRequest &
|
|
61
|
-
(CredentialRequestJwtVcJson |
|
|
61
|
+
(CredentialRequestJwtVcJson | CredentialRequestJwtVcJsonLdAndLdpVc | CredentialRequestSdJwtVc);
|
|
62
62
|
|
|
63
|
-
export interface CredentialRequestJwtVcJsonLdAndLdpVcV1_0_11
|
|
64
|
-
extends CommonCredentialRequest,
|
|
65
|
-
Pick<JsonLdIssuerCredentialDefinition, 'credentialSubject' | 'types'> {
|
|
66
|
-
format: 'ldp_vc' | 'jwt_vc_json-ld';
|
|
67
|
-
}
|
|
68
63
|
export interface CredentialIssuerMetadataV1_0_11 extends CredentialIssuerMetadataOpts, Partial<AuthorizationServerMetadata> {
|
|
69
64
|
credential_endpoint: string; // REQUIRED. URL of the Credential Issuer's Credential Endpoint. This URL MUST use the https scheme and MAY contain port, path and query parameter components.
|
|
70
65
|
authorization_server?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/oid4vci-common",
|
|
3
|
-
"version": "0.10.1
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "OpenID 4 Verifiable Credential Issuance Common Types",
|
|
5
5
|
"source": "lib/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "05e8ea5bb2a678ad8518b9fef5e29376483c5036"
|
|
61
61
|
}
|